diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-13 20:07:21 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-13 20:07:21 +0200 |
commit | a65bcbc63bef24cf219c63d1b8cfb309c95d1c0f (patch) | |
tree | 973644feaf08adc916dab8fb95d1f6c86194c9c1 /clients/http/common.go | |
parent | a6ea9e8dd2eda48c8405f609e0fb444d3717af53 (diff) | |
download | go-git-a65bcbc63bef24cf219c63d1b8cfb309c95d1c0f.tar.gz |
clients: new Endpoint implementation and InstallProtocol function
Diffstat (limited to 'clients/http/common.go')
-rw-r--r-- | clients/http/common.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clients/http/common.go b/clients/http/common.go index e7c43d5..a4b86bd 100644 --- a/clients/http/common.go +++ b/clients/http/common.go @@ -2,7 +2,6 @@ package http import ( - "errors" "fmt" "net/http" @@ -10,8 +9,6 @@ import ( "gopkg.in/src-d/go-git.v4/core" ) -var InvalidAuthMethodErr = errors.New("invalid http auth method: a http.HTTPAuthMethod should be provided.") - type HTTPAuthMethod interface { common.AuthMethod setAuth(r *http.Request) @@ -53,7 +50,7 @@ func NewHTTPError(r *http.Response) error { err := &HTTPError{r} if r.StatusCode == 404 || r.StatusCode == 401 { - return core.NewPermanentError(common.NotFoundErr) + return core.NewPermanentError(common.ErrNotFound) } return core.NewUnexpectedError(err) |