mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
chore: Upgrade to golangci-lint v2 (#7236)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
7
plugin/cache/cache.go
vendored
7
plugin/cache/cache.go
vendored
@@ -189,11 +189,12 @@ func (w *ResponseWriter) WriteMsg(res *dns.Msg) error {
|
||||
|
||||
msgTTL := dnsutil.MinimalTTL(res, mt)
|
||||
var duration time.Duration
|
||||
if mt == response.NameError || mt == response.NoData {
|
||||
switch mt {
|
||||
case response.NameError, response.NoData:
|
||||
duration = computeTTL(msgTTL, w.minnttl, w.nttl)
|
||||
} else if mt == response.ServerError {
|
||||
case response.ServerError:
|
||||
duration = w.failttl
|
||||
} else {
|
||||
default:
|
||||
duration = computeTTL(msgTTL, w.minpttl, w.pttl)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user