lint(revive): fix context-as-argument violations (#7976)

This commit is contained in:
Ville Vesilehto
2026-03-30 03:01:03 +03:00
committed by GitHub
parent 61330515de
commit 7fd983b02c
3 changed files with 9 additions and 6 deletions

View File

@@ -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 {