diff --git a/.circleci/config.yml b/.circleci/config.yml index e0d9608931..67e58e7c75 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,7 +126,7 @@ jobs: name: Install golangci-lint command: | download=https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh - wget -O- -q $download | sh -x -s -- -d -b /go/bin/ v1.23.6 + wget -O- -q $download | sh -x -s -- -d -b /go/bin/ v1.40.1 - run: go mod download - run: name: lint diff --git a/GNUmakefile b/GNUmakefile index abfb87e837..1d21164677 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,7 +8,7 @@ GOTOOLS = \ github.com/gogo/protobuf/protoc-gen-gofast@$(GOGOVERSION) \ github.com/hashicorp/protoc-gen-go-binary \ github.com/vektra/mockery/cmd/mockery \ - github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.6 + github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 GOTAGS ?= GOOS?=$(shell go env GOOS) diff --git a/agent/dns.go b/agent/dns.go index fa1718c567..cad5ac0f33 100644 --- a/agent/dns.go +++ b/agent/dns.go @@ -1429,18 +1429,16 @@ func (d *DNSServer) serviceNodeRecords(cfg *dnsConfig, dc string, nodes structs. } handled[records[0].String()] = struct{}{} - if records != nil { - switch records[0].(type) { - case *dns.CNAME: - // keep track of the first CNAME + associated RRs but don't add to the resp.Answer yet - // this will only be added if no non-CNAME RRs are found - if len(answerCNAME) == 0 { - answerCNAME = records - } - default: - resp.Answer = append(resp.Answer, records...) - had_answer = true + switch records[0].(type) { + case *dns.CNAME: + // keep track of the first CNAME + associated RRs but don't add to the resp.Answer yet + // this will only be added if no non-CNAME RRs are found + if len(answerCNAME) == 0 { + answerCNAME = records } + default: + resp.Answer = append(resp.Answer, records...) + had_answer = true } if had_answer {