diff options
author | 2018-04-20 11:01:06 +0100 | |
---|---|---|
committer | 2018-04-20 11:01:06 +0100 | |
commit | 8722336fff479e00900e3299f31063a9d1a76e9a (patch) | |
tree | deb3d99aeae1d8543a3dbfd20bc36b4ef7daff1b /plugin/etcd | |
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/etcd')
-rw-r--r-- | plugin/etcd/etcd.go | 3 | ||||
-rw-r--r-- | plugin/etcd/handler.go | 3 | ||||
-rw-r--r-- | plugin/etcd/lookup_test.go | 3 | ||||
-rw-r--r-- | plugin/etcd/setup.go | 3 | ||||
-rw-r--r-- | plugin/etcd/stub_handler.go | 3 | ||||
-rw-r--r-- | plugin/etcd/xfr.go | 3 |
6 files changed, 12 insertions, 6 deletions
diff --git a/plugin/etcd/etcd.go b/plugin/etcd/etcd.go index 5fa66b90a..2887b041e 100644 --- a/plugin/etcd/etcd.go +++ b/plugin/etcd/etcd.go @@ -13,10 +13,11 @@ import ( "github.com/coredns/coredns/plugin/proxy" "github.com/coredns/coredns/request" + "context" + "github.com/coredns/coredns/plugin/pkg/upstream" etcdc "github.com/coreos/etcd/client" "github.com/miekg/dns" - "golang.org/x/net/context" ) // Etcd is a plugin talks to an etcd cluster. diff --git a/plugin/etcd/handler.go b/plugin/etcd/handler.go index a2f7fb7b9..fa1a14e82 100644 --- a/plugin/etcd/handler.go +++ b/plugin/etcd/handler.go @@ -5,8 +5,9 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/request" + "context" + "github.com/miekg/dns" - "golang.org/x/net/context" ) // ServeDNS implements the plugin.Handler interface. diff --git a/plugin/etcd/lookup_test.go b/plugin/etcd/lookup_test.go index b25637fd8..2779d720b 100644 --- a/plugin/etcd/lookup_test.go +++ b/plugin/etcd/lookup_test.go @@ -14,9 +14,10 @@ import ( "github.com/coredns/coredns/plugin/proxy" "github.com/coredns/coredns/plugin/test" + "context" + etcdc "github.com/coreos/etcd/client" "github.com/miekg/dns" - "golang.org/x/net/context" ) func init() { diff --git a/plugin/etcd/setup.go b/plugin/etcd/setup.go index e9a1e013e..68365a03d 100644 --- a/plugin/etcd/setup.go +++ b/plugin/etcd/setup.go @@ -9,9 +9,10 @@ import ( "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/coredns/coredns/plugin/proxy" + "context" + etcdc "github.com/coreos/etcd/client" "github.com/mholt/caddy" - "golang.org/x/net/context" ) func init() { diff --git a/plugin/etcd/stub_handler.go b/plugin/etcd/stub_handler.go index 6f1e7750e..637d2891a 100644 --- a/plugin/etcd/stub_handler.go +++ b/plugin/etcd/stub_handler.go @@ -6,8 +6,9 @@ import ( "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" + "context" + "github.com/miekg/dns" - "golang.org/x/net/context" ) // Stub wraps an Etcd. We have this type so that it can have a ServeDNS method. diff --git a/plugin/etcd/xfr.go b/plugin/etcd/xfr.go index fcb8dda07..bf4ab95d6 100644 --- a/plugin/etcd/xfr.go +++ b/plugin/etcd/xfr.go @@ -3,9 +3,10 @@ package etcd import ( "time" + "context" + "github.com/coredns/coredns/request" "github.com/miekg/dns" - "golang.org/x/net/context" ) // Serial implements the Transferer interface. |