From daf3b029c85d9a02753a0022b1412821ddfcaa43 Mon Sep 17 00:00:00 2001 From: Dimitri Herzog Date: Sun, 26 May 2024 17:54:22 +0200 Subject: [PATCH] chore: update golangci-lint (#1495) --- .golangci.yml | 4 ++-- Makefile | 2 +- resolver/query_logging_resolver.go | 2 +- resolver/upstream_resolver.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 60630a52e..235aeb0ee 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -21,7 +21,7 @@ linters: - godox - gofmt - goimports - - gomnd + - mnd - gomodguard - gosec - gosimple @@ -72,7 +72,7 @@ linters: fast: false linters-settings: - gomnd: + mnd: ignored-numbers: - "0666" ginkgolinter: diff --git a/Makefile b/Makefile index e61d09b14..0a381e866 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/resolver/query_logging_resolver.go b/resolver/query_logging_resolver.go index 91e880d0a..e4633d697 100644 --- a/resolver/query_logging_resolver.go +++ b/resolver/query_logging_resolver.go @@ -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 { diff --git a/resolver/upstream_resolver.go b/resolver/upstream_resolver.go index 605066964..f49a6b25a 100644 --- a/resolver/upstream_resolver.go +++ b/resolver/upstream_resolver.go @@ -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)