diff --git a/Makefile b/Makefile index b2069c6..e250819 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,3 @@ test: ## Run tests only test-coverage: ## Run tests and show coverage in browser go test -v -coverprofile=$(COVERAGE) -covermode=count go tool cover -html=$(COVERAGE) - -install: ## Install packages for dependencies - go get github.com/Masterminds/glide - glide install diff --git a/circle.yml b/circle.yml index 4adcf94..f976a80 100644 --- a/circle.yml +++ b/circle.yml @@ -11,8 +11,6 @@ dependencies: - go get github.com/jstemmer/go-junit-report - mkdir -p $REPO_PATH - rsync -azC --delete ./ $REPO_PATH/ - override: - - cd $REPO_PATH && make install test: override: diff --git a/digestRequest.go b/digestRequest.go index de00615..63e2cb7 100644 --- a/digestRequest.go +++ b/digestRequest.go @@ -9,7 +9,6 @@ import ( "strings" "github.com/delphinus/random-string" - "github.com/pkg/errors" "golang.org/x/net/context" ) @@ -70,7 +69,7 @@ func New(ctx context.Context, username, password string) *DigestRequest { func (r *DigestRequest) Do(req *http.Request) (*http.Response, error) { parts, err := r.makeParts(req) if err != nil { - return nil, errors.WithStack(err) + return nil, err } if parts != nil { @@ -84,7 +83,7 @@ func (r *DigestRequest) makeParts(req *http.Request) (map[string]string, error) authReq, err := http.NewRequest(req.Method, req.URL.String(), nil) resp, err := r.client.Do(authReq) if err != nil { - return nil, errors.WithStack(err) + return nil, err } defer func() { _ = resp.Body.Close() }() @@ -93,7 +92,7 @@ func (r *DigestRequest) makeParts(req *http.Request) (map[string]string, error) } if len(resp.Header[wwwAuthenticate]) == 0 { - return nil, errors.Errorf("headers do not have %s", wwwAuthenticate) + return nil, fmt.Errorf("headers do not have %s", wwwAuthenticate) } headers := strings.Split(resp.Header[wwwAuthenticate][0], ",") @@ -107,7 +106,7 @@ func (r *DigestRequest) makeParts(req *http.Request) (map[string]string, error) } if len(parts) != len(wanted) { - return nil, errors.Errorf("header is invalid: %+v", parts) + return nil, fmt.Errorf("header is invalid: %+v", parts) } return parts, nil diff --git a/glide.lock b/glide.lock deleted file mode 100644 index b547bd2..0000000 --- a/glide.lock +++ /dev/null @@ -1,19 +0,0 @@ -hash: b6f4052702876c99020bbfbc9faf6838976254b53627483a132265b54cf040a7 -updated: 2017-05-20T14:46:18.013330986+09:00 -imports: -- name: github.com/delphinus/random-string - version: 3a848976dd952cb4263f7aa61a6886d16014151b -- name: github.com/pkg/errors - version: 645ef00459ed84a119197bfb8d8205042c6df63d -- name: golang.org/x/net - version: da118f7b8e5954f39d0d2130ab35d4bf0e3cb344 - subpackages: - - context -testImports: -- name: github.com/abbot/go-http-auth - version: d45c47bedec736d172957bd394786b76626fa8ac -- name: golang.org/x/crypto - version: c7af5bf2638a1164f2eb5467c39c6cffbd13a02e - subpackages: - - bcrypt - - blowfish diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index ea71973..0000000 --- a/glide.yaml +++ /dev/null @@ -1,11 +0,0 @@ -package: github.com/delphinus/go-digest-request -import: -- package: github.com/delphinus/random-string -- package: github.com/pkg/errors - version: ^0.8.0 -- package: golang.org/x/net - subpackages: - - context -testImport: -- package: github.com/abbot/go-http-auth - version: d45c47bedec736d172957bd394786b76626fa8ac