mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 19:55:32 -04:00
lint(revive): fix context-as-argument violations (#7976)
This commit is contained in:
@@ -71,6 +71,8 @@ func (f HandlerFunc) Name() string { return "handlerfunc" }
|
||||
func Error(name string, err error) error { return fmt.Errorf("%s/%s: %w", "plugin", name, err) }
|
||||
|
||||
// NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a `no next plugin found` error.
|
||||
//
|
||||
//nolint:revive // ctx is not the first parameter to preserve the existing public API.
|
||||
func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||
if next != nil {
|
||||
if span := ot.SpanFromContext(ctx); span != nil {
|
||||
|
||||
Reference in New Issue
Block a user