Skip to content

Commit

Permalink
Use log.Debugf to format instead of fmt.Sprintf
Browse files Browse the repository at this point in the history
This is caught by golangci-lint 1.60.1.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed Aug 20, 2024
1 parent a912c4f commit beac151
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions coredns/plugin/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package lighthouse
import (
"context"
"errors"
"fmt"

"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
Expand All @@ -47,8 +46,7 @@ func (lh *Lighthouse) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns
}

if state.QType() != dns.TypeA && state.QType() != dns.TypeAAAA && state.QType() != dns.TypeSRV {
msg := fmt.Sprintf("Query of type %d is not supported", state.QType())
log.Debugf(msg)
log.Debugf("Query of type %d is not supported", state.QType())

return lh.nextOrFailure(ctx, state, r, dns.RcodeNotImplemented)
}
Expand Down

0 comments on commit beac151

Please sign in to comment.