chore: bump golangci-lint to v2.11.4 (#7983)

This commit is contained in:
Ville Vesilehto
2026-03-31 00:39:09 +03:00
committed by GitHub
parent 4091e650fe
commit 2ba4340362
8 changed files with 34 additions and 36 deletions

View File

@@ -36,7 +36,7 @@ type dio struct {
proto string
enc *encoder
queue chan *tap.Dnstap
dropped uint32
dropped atomic.Uint32
quit chan struct{}
flushTimeout time.Duration
tcpTimeout time.Duration
@@ -108,7 +108,7 @@ func (d *dio) Dnstap(payload *tap.Dnstap) {
select {
case d.queue <- payload:
default:
atomic.AddUint32(&d.dropped, 1)
d.dropped.Add(1)
}
}
@@ -142,7 +142,7 @@ func (d *dio) serve() {
return
case payload := <-d.queue:
if err := d.write(payload); err != nil {
atomic.AddUint32(&d.dropped, 1)
d.dropped.Add(1)
if !errors.Is(err, errNoOutput) {
// Redial immediately if it's not an output connection error
d.dial()
@@ -153,7 +153,7 @@ func (d *dio) serve() {
d.enc.flush()
}
case <-errorCheckTicker.C:
if dropped := atomic.SwapUint32(&d.dropped, 0); dropped > 0 {
if dropped := d.dropped.Swap(0); dropped > 0 {
d.logger.Warningf("Dropped dnstap messages: %d\n", dropped)
}
if d.enc == nil {