Skip to content

Commit

Permalink
chore: update golangci-lint (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xERR0R authored May 26, 2024
1 parent 1a4118b commit daf3b02
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linters:
- godox
- gofmt
- goimports
- gomnd
- mnd
- gomodguard
- gosec
- gosimple
Expand Down Expand Up @@ -72,7 +72,7 @@ linters:
fast: false

linters-settings:
gomnd:
mnd:
ignored-numbers:
- "0666"
ginkgolinter:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GO_BUILD_LD_FLAGS:=\
GO_BUILD_OUTPUT:=$(BIN_OUT_DIR)/$(BINARY_NAME)$(BINARY_SUFFIX)

# define version of golangci-lint here. If defined in tools.go, go mod perfoms automatically downgrade to older version which doesn't work with golang >=1.18
GOLANG_LINT_VERSION=v1.57.2
GOLANG_LINT_VERSION=v1.58.2

GINKGO_PROCS?=-p

Expand Down
2 changes: 1 addition & 1 deletion resolver/query_logging_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (r *QueryLoggingResolver) writeLog(ctx context.Context) {

r.writer.Write(logEntry)

halfCap := cap(r.logChan) / 2 //nolint:gomnd
halfCap := cap(r.logChan) / 2 //nolint:mnd

// if log channel is > 50% full, this could be a problem with slow writer (external storage over network etc.)
if len(r.logChan) > halfCap {
Expand Down
2 changes: 1 addition & 1 deletion resolver/upstream_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (r *dnsUpstreamClient) raceClients(

// We don't explicitly close the channel, but since the buffer is big enough for all goroutines,
// it will be GC'ed and closed automatically.
ch := make(chan exchangeResult, 2) //nolint:gomnd // TCP and UDP
ch := make(chan exchangeResult, 2) //nolint:mnd // TCP and UDP

exchange := func(client *dns.Client, proto model.RequestProtocol) {
msg, rtt, err := client.ExchangeContext(ctx, msg, upstreamURL)
Expand Down

0 comments on commit daf3b02

Please sign in to comment.