Skip to content

Commit

Permalink
ci: Check vet and fix vet errors
Browse files Browse the repository at this point in the history
Closes #1090

Signed-off-by: arekkas <aeneas@ory.am>
  • Loading branch information
arekkas committed Oct 25, 2018
1 parent e876b28 commit b26ea46
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- checkout
- run: curl -L https://git.io/vp6lP | sh
- run: mv ./bin/* $GOPATH/bin
- run: gometalinter --disable-all --enable=gofmt --vendor ./...
- run: gometalinter --disable-all --enable=gofmt --enable=vet --vendor ./...

test:
docker:
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/handler_oauth2_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func newOAuth2Provider(c *config.Config) fosite.OAuth2Provider {
}

if tracer, err := c.GetTracer(); err == nil && tracer.IsLoaded() {
hasher = &tracing.TracedBCrypt{fc.HashCost}
hasher = &tracing.TracedBCrypt{WorkFactor: fc.HashCost}
}

return compose.Compose(
Expand Down
3 changes: 2 additions & 1 deletion cmd/token_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ var tokenUserCmd = &cobra.Command{
server := &http.Server{Addr: fmt.Sprintf(":%d", port), Handler: r}
var shutdown = func() {
time.Sleep(time.Second * 1)
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()
server.Shutdown(ctx)
}

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (c *Config) Context() *Context {
}

if tracer, err := c.GetTracer(); err == nil && tracer.IsLoaded() {
hasher = &tracing.TracedBCrypt{c.BCryptWorkFactor}
hasher = &tracing.TracedBCrypt{WorkFactor: c.BCryptWorkFactor}
}

c.context = &Context{
Expand Down

0 comments on commit b26ea46

Please sign in to comment.