Skip to content

Commit

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

Signed-off-by: arekkas <aeneas@ory.am>
  • Loading branch information
aeneasr authored Oct 25, 2018
1 parent e876b28 commit 2af17dc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ jobs:
# echo 'export GO111MODULE=on' >> $BASH_ENV
# source $BASH_ENV
- checkout
- run:
name: Enable go1.11 modules
command: |
echo 'export GO111MODULE=on' >> $BASH_ENV
source $BASH_ENV
- run: curl -L https://git.io/vp6lP | sh
- run: mv ./bin/* $GOPATH/bin
- run: gometalinter --disable-all --enable=gofmt --vendor ./...
- run: go mod download
- 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 2af17dc

Please sign in to comment.