Skip to content

Commit

Permalink
fix error reported by golangLintCI
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Oct 10, 2024
1 parent 405e084 commit 5623d4e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
working-directory: ${{ matrix.workdir }}
skip-pkg-cache: true
version: v1.61.0
working-directory: ${{ matrix.workdir }}
7 changes: 5 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ linters:
- dogsled
- durationcheck
- errcheck
- copyloopvar
# - copyloopvar # need upgrade to Go 1.22
- govet
- staticcheck
- gosimple
- gofmt
- gofumpt
Expand All @@ -30,7 +31,6 @@ linters:
- wastedassign
- unconvert
- misspell
- shadow

# don't enable:
# - asciicheck
Expand All @@ -49,6 +49,9 @@ linters:
# - wsl

linters-settings:
govet:
enable:
- shadow
whitespace:
multi-func: true
lll:
Expand Down
1 change: 0 additions & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func (a *App) Run() error {
}
}
for _, srv := range a.opts.servers {
srv := srv
eg.Go(func() error {
<-ctx.Done() // wait for stop signal
stopCtx, cancel := context.WithTimeout(NewContext(a.opts.ctx, a), a.opts.stopTimeout)
Expand Down
2 changes: 1 addition & 1 deletion transport/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func streamClientInterceptor(ms []middleware.Middleware, filters []selector.Node
return nil, err
}

h := func(ctx context.Context, req interface{}) (interface{}, error) {
h := func(_ context.Context, _ interface{}) (interface{}, error) {
return streamer, nil
}

Expand Down
2 changes: 1 addition & 1 deletion transport/grpc/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s *Server) streamServerInterceptor() grpc.StreamServerInterceptor {
replyHeader: headerCarrier(replyHeader),
})

h := func(_ context.Context, req interface{}) (interface{}, error) {
h := func(_ context.Context, _ interface{}) (interface{}, error) {
return handler(srv, ss), nil
}

Expand Down

0 comments on commit 5623d4e

Please sign in to comment.