uses newPathError

This commit is contained in:
Christoph Polcin
2014-10-24 11:38:11 +02:00
parent 3a09040ecb
commit eb64a8f4bd
2 changed files with 5 additions and 9 deletions

View File

@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
@@ -17,10 +16,6 @@ func log(msg interface{}) {
fmt.Println(msg)
}
func Error(r *http.Response) error {
return errors.New(fmt.Sprintf("%s - %s %s", r.Status, r.Request.Method, r.Request.URL.String()))
}
func newPathError(op string, path string, statusCode int) error {
return &os.PathError{op, path, errors.New(fmt.Sprintf("%d", statusCode))}
}