mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 19:05:19 -05:00
Move nonwriter to mw/pkg/nonwriter (#948)
Make it its own package as shared between autopath and federation. Fixes #933
This commit is contained in:
@@ -36,6 +36,7 @@ import (
|
||||
|
||||
"github.com/coredns/coredns/middleware"
|
||||
"github.com/coredns/coredns/middleware/pkg/dnsutil"
|
||||
"github.com/coredns/coredns/middleware/pkg/nonwriter"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
@@ -101,7 +102,7 @@ func (a *AutoPath) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Ms
|
||||
for i, s := range searchpath {
|
||||
newQName := base + "." + s
|
||||
ar.Question[0].Name = newQName
|
||||
nw := NewNonWriter(w)
|
||||
nw := nonwriter.New(w)
|
||||
|
||||
rcode, err := middleware.NextOrFailure(a.Name(), a.Next, ctx, nw, ar)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user