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:
Miek Gieben
2017-08-19 17:28:42 +01:00
committed by GitHub
parent 219a899772
commit 87eb0d39a4
6 changed files with 46 additions and 46 deletions

View File

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