diff options
author | 2016-09-07 11:10:16 +0100 | |
---|---|---|
committer | 2016-09-07 11:10:16 +0100 | |
commit | d1f17fa7e061d91aa0af7e1fb959a68db899c812 (patch) | |
tree | 0f828a0e7bd8ca86051a721dae48e8c19a0a2f0e /test/proxy_test.go | |
parent | 684330fd28f65a7a8d1ad01fb4c6c5db78240f29 (diff) | |
download | coredns-d1f17fa7e061d91aa0af7e1fb959a68db899c812.tar.gz coredns-d1f17fa7e061d91aa0af7e1fb959a68db899c812.tar.zst coredns-d1f17fa7e061d91aa0af7e1fb959a68db899c812.zip |
Cleanup: put middleware helper functions in pkgs (#245)
Move all (almost all) Go files in middleware into their
own packages. This makes for better naming and discoverability.
Lot of changes elsewhere to make this change.
The middleware.State was renamed to request.Request which is better,
but still does not cover all use-cases. It was also moved out middleware
because it is used by `dnsserver` as well.
A pkg/dnsutil packages was added for shared, handy, dns util functions.
All normalize functions are now put in normalize.go
Diffstat (limited to 'test/proxy_test.go')
-rw-r--r-- | test/proxy_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/proxy_test.go b/test/proxy_test.go index 96a2c4c0d..e946f4354 100644 --- a/test/proxy_test.go +++ b/test/proxy_test.go @@ -5,9 +5,9 @@ import ( "log" "testing" - "github.com/miekg/coredns/middleware" "github.com/miekg/coredns/middleware/proxy" "github.com/miekg/coredns/middleware/test" + "github.com/miekg/coredns/request" "github.com/miekg/dns" ) @@ -46,7 +46,7 @@ func TestLookupProxy(t *testing.T) { log.SetOutput(ioutil.Discard) p := proxy.New([]string{udp}) - state := middleware.State{W: &test.ResponseWriter{}, Req: new(dns.Msg)} + state := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)} resp, err := p.Lookup(state, "example.org.", dns.TypeA) if err != nil { t.Fatal("Expected to receive reply, but didn't") |