Skip to content

Commit

Permalink
Merge pull request #6 from delphinus/feature/remove-dependencies-lock
Browse files Browse the repository at this point in the history
Remove dependencies lock
  • Loading branch information
delphinus authored Sep 26, 2017
2 parents 0f5e9ee + 4b7b578 commit b80f4d3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 41 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 4 additions & 5 deletions digestRequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"strings"

"github.com/delphinus/random-string"
"github.com/pkg/errors"
"golang.org/x/net/context"
)

Expand Down Expand Up @@ -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 {
Expand All @@ -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() }()

Expand All @@ -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], ",")
Expand All @@ -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
Expand Down
19 changes: 0 additions & 19 deletions glide.lock

This file was deleted.

11 changes: 0 additions & 11 deletions glide.yaml

This file was deleted.

0 comments on commit b80f4d3

Please sign in to comment.