diff options
author | 2018-04-20 11:01:06 +0100 | |
---|---|---|
committer | 2018-04-20 11:01:06 +0100 | |
commit | 8722336fff479e00900e3299f31063a9d1a76e9a (patch) | |
tree | deb3d99aeae1d8543a3dbfd20bc36b4ef7daff1b /plugin/dnstap | |
parent | 61726b3721b6049f436841fe4c5f7db48d5a39d0 (diff) | |
download | coredns-8722336fff479e00900e3299f31063a9d1a76e9a.tar.gz coredns-8722336fff479e00900e3299f31063a9d1a76e9a.tar.zst coredns-8722336fff479e00900e3299f31063a9d1a76e9a.zip |
global: move to context (#1699)
* global: move to context
Move from golang.org/x/net/context to std lib's context.
Change done with:
for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done
for i in **/*.go; do goimports -w $i; done
* drop from dns.pb.go as well
Diffstat (limited to 'plugin/dnstap')
-rw-r--r-- | plugin/dnstap/handler.go | 3 | ||||
-rw-r--r-- | plugin/dnstap/handler_test.go | 3 | ||||
-rw-r--r-- | plugin/dnstap/test/helpers.go | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/plugin/dnstap/handler.go b/plugin/dnstap/handler.go index 5b290f8f4..c7318c47a 100644 --- a/plugin/dnstap/handler.go +++ b/plugin/dnstap/handler.go @@ -6,9 +6,10 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/dnstap/taprw" + "context" + tap "github.com/dnstap/golang-dnstap" "github.com/miekg/dns" - "golang.org/x/net/context" ) // Dnstap is the dnstap handler. diff --git a/plugin/dnstap/handler_test.go b/plugin/dnstap/handler_test.go index 3809bc4d0..231aca500 100644 --- a/plugin/dnstap/handler_test.go +++ b/plugin/dnstap/handler_test.go @@ -10,9 +10,10 @@ import ( "github.com/coredns/coredns/plugin/dnstap/test" mwtest "github.com/coredns/coredns/plugin/test" + "context" + tap "github.com/dnstap/golang-dnstap" "github.com/miekg/dns" - "golang.org/x/net/context" ) func testCase(t *testing.T, tapq, tapr *tap.Message, q, r *dns.Msg) { diff --git a/plugin/dnstap/test/helpers.go b/plugin/dnstap/test/helpers.go index 0daa911b3..3e43970a6 100644 --- a/plugin/dnstap/test/helpers.go +++ b/plugin/dnstap/test/helpers.go @@ -6,8 +6,9 @@ import ( "github.com/coredns/coredns/plugin/dnstap/msg" + "context" + tap "github.com/dnstap/golang-dnstap" - "golang.org/x/net/context" ) // Context is a message trap. |