Skip to content

Commit

Permalink
Upgrading linter
Browse files Browse the repository at this point in the history
  • Loading branch information
samlown committed Aug 1, 2024
1 parent 165913e commit 86ce0f4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
version: v1.58
15 changes: 0 additions & 15 deletions .golangci.toml

This file was deleted.

30 changes: 30 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
run:
timeout: "120s"

output:
formats:
- format: "colored-line-number"

linters:
enable:
- "gocyclo"
- "unconvert"
- "goimports"
- "govet"
- "misspell"
- "nakedret"
- "revive"
- "goconst"
- "unparam"
- "gofmt"
- "errname"
- "zerologlint"

linters-settings:
staticcheck:
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: ["all"]

issues:
exclude-use-default: false
4 changes: 2 additions & 2 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ func prepareNATSClient(conf *natsconf.Config, name string) *nats.EncodedConn {
opts = append(opts, nats.Name(name))

// Add our own connection logging stuff
opts = append(opts, nats.ConnectHandler(func(nc *nats.Conn) {
opts = append(opts, nats.ConnectHandler(func(_ *nats.Conn) {
log.Info().Str("url", conf.URL).Msg("nats connected")
}))
opts = append(opts, nats.DisconnectHandler(func(nc *nats.Conn) {
opts = append(opts, nats.DisconnectHandler(func(_ *nats.Conn) {
log.Warn().Str("url", conf.URL).Msg("nats disconnected")
}))

Expand Down

0 comments on commit 86ce0f4

Please sign in to comment.