aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-04-20 11:01:06 +0100
committerGravatar GitHub <noreply@github.com> 2018-04-20 11:01:06 +0100
commit8722336fff479e00900e3299f31063a9d1a76e9a (patch)
treedeb3d99aeae1d8543a3dbfd20bc36b4ef7daff1b
parent61726b3721b6049f436841fe4c5f7db48d5a39d0 (diff)
downloadcoredns-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
-rw-r--r--core/dnsserver/server.go2
-rw-r--r--core/dnsserver/server_grpc.go2
-rw-r--r--core/dnsserver/server_test.go2
-rw-r--r--core/dnsserver/server_tls.go2
-rw-r--r--pb/dns.pb.go3
-rw-r--r--plugin/auto/auto.go3
-rw-r--r--plugin/autopath/autopath.go3
-rw-r--r--plugin/autopath/autopath_test.go3
-rw-r--r--plugin/backend.go2
-rw-r--r--plugin/cache/cache_test.go2
-rw-r--r--plugin/cache/handler.go3
-rw-r--r--plugin/cache/prefech_test.go3
-rw-r--r--plugin/cache/spoof_test.go3
-rw-r--r--plugin/chaos/chaos.go3
-rw-r--r--plugin/chaos/chaos_test.go3
-rw-r--r--plugin/dnssec/handler.go3
-rw-r--r--plugin/dnssec/handler_test.go3
-rw-r--r--plugin/dnstap/handler.go3
-rw-r--r--plugin/dnstap/handler_test.go3
-rw-r--r--plugin/dnstap/test/helpers.go3
-rw-r--r--plugin/erratic/erratic.go3
-rw-r--r--plugin/erratic/erratic_test.go3
-rw-r--r--plugin/errors/errors.go3
-rw-r--r--plugin/errors/errors_test.go3
-rw-r--r--plugin/etcd/etcd.go3
-rw-r--r--plugin/etcd/handler.go3
-rw-r--r--plugin/etcd/lookup_test.go3
-rw-r--r--plugin/etcd/setup.go3
-rw-r--r--plugin/etcd/stub_handler.go3
-rw-r--r--plugin/etcd/xfr.go3
-rw-r--r--plugin/federation/federation.go3
-rw-r--r--plugin/federation/federation_test.go3
-rw-r--r--plugin/file/cname_test.go3
-rw-r--r--plugin/file/delegation_test.go3
-rw-r--r--plugin/file/dname_test.go3
-rw-r--r--plugin/file/dnssec_test.go3
-rw-r--r--plugin/file/ds_test.go3
-rw-r--r--plugin/file/ent_test.go3
-rw-r--r--plugin/file/file.go3
-rw-r--r--plugin/file/glue_test.go3
-rw-r--r--plugin/file/lookup_test.go3
-rw-r--r--plugin/file/wildcard_test.go3
-rw-r--r--plugin/file/xfr.go3
-rw-r--r--plugin/forward/connect.go3
-rw-r--r--plugin/forward/forward.go3
-rw-r--r--plugin/forward/health_test.go3
-rw-r--r--plugin/forward/lookup.go3
-rw-r--r--plugin/hosts/hosts.go2
-rw-r--r--plugin/hosts/hosts_test.go3
-rw-r--r--plugin/kubernetes/handler.go3
-rw-r--r--plugin/kubernetes/handler_pod_disabled_test.go3
-rw-r--r--plugin/kubernetes/handler_pod_insecure_test.go3
-rw-r--r--plugin/kubernetes/handler_pod_verified_test.go3
-rw-r--r--plugin/kubernetes/handler_test.go3
-rw-r--r--plugin/kubernetes/kubernetes_apex_test.go3
-rw-r--r--plugin/kubernetes/reverse_test.go3
-rw-r--r--plugin/kubernetes/xfr.go3
-rw-r--r--plugin/kubernetes/xfr_test.go3
-rw-r--r--plugin/loadbalance/handler.go3
-rw-r--r--plugin/loadbalance/loadbalance_test.go3
-rw-r--r--plugin/log/log.go3
-rw-r--r--plugin/log/log_test.go3
-rw-r--r--plugin/log/setup_test.go9
-rw-r--r--plugin/metrics/context.go2
-rw-r--r--plugin/metrics/handler.go3
-rw-r--r--plugin/metrics/metrics_test.go3
-rw-r--r--plugin/metrics/vars/report.go3
-rw-r--r--plugin/nsid/nsid.go3
-rw-r--r--plugin/nsid/nsid_test.go3
-rw-r--r--plugin/pkg/fuzz/do.go3
-rw-r--r--plugin/plugin.go3
-rw-r--r--plugin/proxy/dns.go3
-rw-r--r--plugin/proxy/dnstap.go3
-rw-r--r--plugin/proxy/dnstap_test.go3
-rw-r--r--plugin/proxy/exchanger.go3
-rw-r--r--plugin/proxy/google.go3
-rw-r--r--plugin/proxy/grpc.go3
-rw-r--r--plugin/proxy/grpc_test.go3
-rw-r--r--plugin/proxy/lookup.go3
-rw-r--r--plugin/proxy/proxy.go3
-rw-r--r--plugin/reverse/reverse.go3
-rw-r--r--plugin/reverse/reverse_test.go3
-rw-r--r--plugin/rewrite/reverter_test.go3
-rw-r--r--plugin/rewrite/rewrite.go2
-rw-r--r--plugin/rewrite/rewrite_test.go3
-rw-r--r--plugin/route53/route53.go3
-rw-r--r--plugin/route53/route53_test.go3
-rw-r--r--plugin/template/template.go3
-rw-r--r--plugin/template/template_test.go3
-rw-r--r--plugin/test/helpers.go3
-rw-r--r--plugin/trace/trace.go3
-rw-r--r--plugin/whoami/whoami.go3
-rw-r--r--plugin/whoami/whoami_test.go3
93 files changed, 178 insertions, 98 deletions
diff --git a/core/dnsserver/server.go b/core/dnsserver/server.go
index 04aaadf21..16cba3bd1 100644
--- a/core/dnsserver/server.go
+++ b/core/dnsserver/server.go
@@ -2,6 +2,7 @@
package dnsserver
import (
+ "context"
"fmt"
"net"
"runtime"
@@ -18,7 +19,6 @@ import (
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
- "golang.org/x/net/context"
)
// Server represents an instance of a server, which serves
diff --git a/core/dnsserver/server_grpc.go b/core/dnsserver/server_grpc.go
index c2f20dcc2..7b3df6474 100644
--- a/core/dnsserver/server_grpc.go
+++ b/core/dnsserver/server_grpc.go
@@ -1,6 +1,7 @@
package dnsserver
import (
+ "context"
"crypto/tls"
"errors"
"fmt"
@@ -9,7 +10,6 @@ import (
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
"github.com/miekg/dns"
"github.com/opentracing/opentracing-go"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/peer"
diff --git a/core/dnsserver/server_test.go b/core/dnsserver/server_test.go
index e7986c397..56a1e0dcc 100644
--- a/core/dnsserver/server_test.go
+++ b/core/dnsserver/server_test.go
@@ -1,13 +1,13 @@
package dnsserver
import (
+ "context"
"testing"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type testPlugin struct{}
diff --git a/core/dnsserver/server_tls.go b/core/dnsserver/server_tls.go
index 12b063661..0fd0c1fbe 100644
--- a/core/dnsserver/server_tls.go
+++ b/core/dnsserver/server_tls.go
@@ -1,12 +1,12 @@
package dnsserver
import (
+ "context"
"crypto/tls"
"fmt"
"net"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// ServerTLS represents an instance of a TLS-over-DNS-server.
diff --git a/pb/dns.pb.go b/pb/dns.pb.go
index 3117102ab..0c75de94a 100644
--- a/pb/dns.pb.go
+++ b/pb/dns.pb.go
@@ -18,7 +18,8 @@ import fmt "fmt"
import math "math"
import (
- context "golang.org/x/net/context"
+ context "context"
+
grpc "google.golang.org/grpc"
)
diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go
index f8d253786..a6485f5ae 100644
--- a/plugin/auto/auto.go
+++ b/plugin/auto/auto.go
@@ -11,8 +11,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/upstream"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type (
diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go
index 1a2e7a5ec..d2c00b7b5 100644
--- a/plugin/autopath/autopath.go
+++ b/plugin/autopath/autopath.go
@@ -37,8 +37,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/nonwriter"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Func defines the function plugin should implement to return a search
diff --git a/plugin/autopath/autopath_test.go b/plugin/autopath/autopath_test.go
index 1d345c123..53140932d 100644
--- a/plugin/autopath/autopath_test.go
+++ b/plugin/autopath/autopath_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var autopathTestCases = []test.Case{
diff --git a/plugin/backend.go b/plugin/backend.go
index 289b08856..b288f2c9a 100644
--- a/plugin/backend.go
+++ b/plugin/backend.go
@@ -6,7 +6,7 @@ import (
"github.com/miekg/dns"
- "golang.org/x/net/context"
+ "context"
)
// ServiceBackend defines a (dynamic) backend that returns a slice of service definitions.
diff --git a/plugin/cache/cache_test.go b/plugin/cache/cache_test.go
index 6c28be26f..0531d1c33 100644
--- a/plugin/cache/cache_test.go
+++ b/plugin/cache/cache_test.go
@@ -4,7 +4,7 @@ import (
"testing"
"time"
- "golang.org/x/net/context"
+ "context"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/response"
diff --git a/plugin/cache/handler.go b/plugin/cache/handler.go
index c2efdc9c7..988b13c4a 100644
--- a/plugin/cache/handler.go
+++ b/plugin/cache/handler.go
@@ -8,9 +8,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
"github.com/prometheus/client_golang/prometheus"
- "golang.org/x/net/context"
)
// ServeDNS implements the plugin.Handler interface.
diff --git a/plugin/cache/prefech_test.go b/plugin/cache/prefech_test.go
index 1cd0758fb..1f32396e1 100644
--- a/plugin/cache/prefech_test.go
+++ b/plugin/cache/prefech_test.go
@@ -8,9 +8,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/dnstest"
+ "context"
+
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestPrefetch(t *testing.T) {
diff --git a/plugin/cache/spoof_test.go b/plugin/cache/spoof_test.go
index c90aee817..a855d8fab 100644
--- a/plugin/cache/spoof_test.go
+++ b/plugin/cache/spoof_test.go
@@ -6,9 +6,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/dnstest"
+ "context"
+
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestSpoof(t *testing.T) {
diff --git a/plugin/chaos/chaos.go b/plugin/chaos/chaos.go
index c9811fbd0..2221499c2 100644
--- a/plugin/chaos/chaos.go
+++ b/plugin/chaos/chaos.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Chaos allows CoreDNS to reply to CH TXT queries and return author or
diff --git a/plugin/chaos/chaos_test.go b/plugin/chaos/chaos_test.go
index e92c32aca..ce42ce7c4 100644
--- a/plugin/chaos/chaos_test.go
+++ b/plugin/chaos/chaos_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestChaos(t *testing.T) {
diff --git a/plugin/dnssec/handler.go b/plugin/dnssec/handler.go
index 0bef73afa..0137720c2 100644
--- a/plugin/dnssec/handler.go
+++ b/plugin/dnssec/handler.go
@@ -6,9 +6,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
"github.com/prometheus/client_golang/prometheus"
- "golang.org/x/net/context"
)
// ServeDNS implements the plugin.Handler interface.
diff --git a/plugin/dnssec/handler_test.go b/plugin/dnssec/handler_test.go
index 77bf36f32..228bf83c9 100644
--- a/plugin/dnssec/handler_test.go
+++ b/plugin/dnssec/handler_test.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var dnssecTestCases = []test.Case{
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.
diff --git a/plugin/erratic/erratic.go b/plugin/erratic/erratic.go
index 5b8cd30c9..b45b05a47 100644
--- a/plugin/erratic/erratic.go
+++ b/plugin/erratic/erratic.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Erratic is a plugin that returns erratic repsonses to each client.
diff --git a/plugin/erratic/erratic_test.go b/plugin/erratic/erratic_test.go
index 6927c5248..452ac42f7 100644
--- a/plugin/erratic/erratic_test.go
+++ b/plugin/erratic/erratic_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestErraticDrop(t *testing.T) {
diff --git a/plugin/errors/errors.go b/plugin/errors/errors.go
index a313f2e0d..1d7c4256b 100644
--- a/plugin/errors/errors.go
+++ b/plugin/errors/errors.go
@@ -11,8 +11,9 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// errorHandler handles DNS errors (and errors from other plugin).
diff --git a/plugin/errors/errors_test.go b/plugin/errors/errors_test.go
index ce965ec6b..bc78f13d5 100644
--- a/plugin/errors/errors_test.go
+++ b/plugin/errors/errors_test.go
@@ -12,8 +12,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestErrors(t *testing.T) {
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.
diff --git a/plugin/federation/federation.go b/plugin/federation/federation.go
index c94e8f819..fbf46eabd 100644
--- a/plugin/federation/federation.go
+++ b/plugin/federation/federation.go
@@ -20,8 +20,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/nonwriter"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Federation contains the name to zone mapping used for federation in kubernetes.
diff --git a/plugin/federation/federation_test.go b/plugin/federation/federation_test.go
index f91f4c676..55d5f3c1b 100644
--- a/plugin/federation/federation_test.go
+++ b/plugin/federation/federation_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestIsNameFederation(t *testing.T) {
diff --git a/plugin/file/cname_test.go b/plugin/file/cname_test.go
index 1dcc491ae..8721cfed6 100644
--- a/plugin/file/cname_test.go
+++ b/plugin/file/cname_test.go
@@ -8,8 +8,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/upstream"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestLookupCNAMEChain(t *testing.T) {
diff --git a/plugin/file/delegation_test.go b/plugin/file/delegation_test.go
index 0685cc513..e084e1c5a 100644
--- a/plugin/file/delegation_test.go
+++ b/plugin/file/delegation_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var delegationTestCases = []test.Case{
diff --git a/plugin/file/dname_test.go b/plugin/file/dname_test.go
index ebb0780a0..5e4f8be99 100644
--- a/plugin/file/dname_test.go
+++ b/plugin/file/dname_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// RFC 6672, Section 2.2. Assuming QTYPE != DNAME.
diff --git a/plugin/file/dnssec_test.go b/plugin/file/dnssec_test.go
index eb6374b03..fb3ca05ab 100644
--- a/plugin/file/dnssec_test.go
+++ b/plugin/file/dnssec_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var dnssecTestCases = []test.Case{
diff --git a/plugin/file/ds_test.go b/plugin/file/ds_test.go
index 537d47def..645cdbd82 100644
--- a/plugin/file/ds_test.go
+++ b/plugin/file/ds_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var dsTestCases = []test.Case{
diff --git a/plugin/file/ent_test.go b/plugin/file/ent_test.go
index 124b4688b..558fe7d97 100644
--- a/plugin/file/ent_test.go
+++ b/plugin/file/ent_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var entTestCases = []test.Case{
diff --git a/plugin/file/file.go b/plugin/file/file.go
index d6804e124..1fd5737c1 100644
--- a/plugin/file/file.go
+++ b/plugin/file/file.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type (
diff --git a/plugin/file/glue_test.go b/plugin/file/glue_test.go
index bf523a90b..29744f043 100644
--- a/plugin/file/glue_test.go
+++ b/plugin/file/glue_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// another personal zone (helps in testing as my secondary is NSD
diff --git a/plugin/file/lookup_test.go b/plugin/file/lookup_test.go
index dd922c1b6..d75157369 100644
--- a/plugin/file/lookup_test.go
+++ b/plugin/file/lookup_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var dnsTestCases = []test.Case{
diff --git a/plugin/file/wildcard_test.go b/plugin/file/wildcard_test.go
index b7cc67f53..e90f833e1 100644
--- a/plugin/file/wildcard_test.go
+++ b/plugin/file/wildcard_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var wildcardTestCases = []test.Case{
diff --git a/plugin/file/xfr.go b/plugin/file/xfr.go
index 4b74dd1e5..0ee985eb9 100644
--- a/plugin/file/xfr.go
+++ b/plugin/file/xfr.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Xfr serves up an AXFR.
diff --git a/plugin/forward/connect.go b/plugin/forward/connect.go
index 6b335c5b1..0a66f2752 100644
--- a/plugin/forward/connect.go
+++ b/plugin/forward/connect.go
@@ -12,8 +12,9 @@ import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func (p *Proxy) readTimeout() time.Duration {
diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go
index 6ad66d19b..153c5ab38 100644
--- a/plugin/forward/forward.go
+++ b/plugin/forward/forward.go
@@ -12,9 +12,10 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
- "golang.org/x/net/context"
)
// Forward represents a plugin instance that can proxy requests to another (DNS) server. It has a list
diff --git a/plugin/forward/health_test.go b/plugin/forward/health_test.go
index 6d286a496..8b238aa10 100644
--- a/plugin/forward/health_test.go
+++ b/plugin/forward/health_test.go
@@ -8,8 +8,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestHealth(t *testing.T) {
diff --git a/plugin/forward/lookup.go b/plugin/forward/lookup.go
index cbfed545e..b3aa41984 100644
--- a/plugin/forward/lookup.go
+++ b/plugin/forward/lookup.go
@@ -7,8 +7,9 @@ package forward
import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Forward forward the request in state as-is. Unlike Lookup that adds EDNS0 suffix to the message.
diff --git a/plugin/hosts/hosts.go b/plugin/hosts/hosts.go
index dcd66d4be..9385f2c37 100644
--- a/plugin/hosts/hosts.go
+++ b/plugin/hosts/hosts.go
@@ -3,7 +3,7 @@ package hosts
import (
"net"
- "golang.org/x/net/context"
+ "context"
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/pkg/dnsutil"
diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go
index 6d5f7955f..67a071d9a 100644
--- a/plugin/hosts/hosts_test.go
+++ b/plugin/hosts/hosts_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestLookupA(t *testing.T) {
diff --git a/plugin/kubernetes/handler.go b/plugin/kubernetes/handler.go
index 6793b334d..680b400d3 100644
--- a/plugin/kubernetes/handler.go
+++ b/plugin/kubernetes/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/kubernetes/handler_pod_disabled_test.go b/plugin/kubernetes/handler_pod_disabled_test.go
index cf6ed50f5..f61f23305 100644
--- a/plugin/kubernetes/handler_pod_disabled_test.go
+++ b/plugin/kubernetes/handler_pod_disabled_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var podModeDisabledCases = []test.Case{
diff --git a/plugin/kubernetes/handler_pod_insecure_test.go b/plugin/kubernetes/handler_pod_insecure_test.go
index b086f3fe6..e14f0e73e 100644
--- a/plugin/kubernetes/handler_pod_insecure_test.go
+++ b/plugin/kubernetes/handler_pod_insecure_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var podModeInsecureCases = []test.Case{
diff --git a/plugin/kubernetes/handler_pod_verified_test.go b/plugin/kubernetes/handler_pod_verified_test.go
index fcd84ee22..e8b3b65a3 100644
--- a/plugin/kubernetes/handler_pod_verified_test.go
+++ b/plugin/kubernetes/handler_pod_verified_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var podModeVerifiedCases = []test.Case{
diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go
index b72ddbbf6..0f210396e 100644
--- a/plugin/kubernetes/handler_test.go
+++ b/plugin/kubernetes/handler_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
api "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
diff --git a/plugin/kubernetes/kubernetes_apex_test.go b/plugin/kubernetes/kubernetes_apex_test.go
index 762e0d1b4..f923da51d 100644
--- a/plugin/kubernetes/kubernetes_apex_test.go
+++ b/plugin/kubernetes/kubernetes_apex_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
var kubeApexCases = []test.Case{
diff --git a/plugin/kubernetes/reverse_test.go b/plugin/kubernetes/reverse_test.go
index ff4011ed0..b43b81422 100644
--- a/plugin/kubernetes/reverse_test.go
+++ b/plugin/kubernetes/reverse_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
api "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
diff --git a/plugin/kubernetes/xfr.go b/plugin/kubernetes/xfr.go
index bd037db8c..b010494db 100644
--- a/plugin/kubernetes/xfr.go
+++ b/plugin/kubernetes/xfr.go
@@ -10,8 +10,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
api "k8s.io/api/core/v1"
)
diff --git a/plugin/kubernetes/xfr_test.go b/plugin/kubernetes/xfr_test.go
index ef02d427a..83602c112 100644
--- a/plugin/kubernetes/xfr_test.go
+++ b/plugin/kubernetes/xfr_test.go
@@ -4,9 +4,10 @@ import (
"strings"
"testing"
+ "context"
+
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
- "golang.org/x/net/context"
api "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/plugin/loadbalance/handler.go b/plugin/loadbalance/handler.go
index da4cf1549..727487dec 100644
--- a/plugin/loadbalance/handler.go
+++ b/plugin/loadbalance/handler.go
@@ -4,8 +4,9 @@ package loadbalance
import (
"github.com/coredns/coredns/plugin"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// RoundRobin is plugin to rewrite responses for "load balancing".
diff --git a/plugin/loadbalance/loadbalance_test.go b/plugin/loadbalance/loadbalance_test.go
index 0d1a0b189..6586cbcd8 100644
--- a/plugin/loadbalance/loadbalance_test.go
+++ b/plugin/loadbalance/loadbalance_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestLoadBalance(t *testing.T) {
diff --git a/plugin/log/log.go b/plugin/log/log.go
index a527ccd90..c60e790ce 100644
--- a/plugin/log/log.go
+++ b/plugin/log/log.go
@@ -13,8 +13,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/response"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Logger is a basic request logging plugin.
diff --git a/plugin/log/log_test.go b/plugin/log/log_test.go
index 3a83e8d54..5efbbd68a 100644
--- a/plugin/log/log_test.go
+++ b/plugin/log/log_test.go
@@ -10,8 +10,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/response"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestLoggedStatus(t *testing.T) {
diff --git a/plugin/log/setup_test.go b/plugin/log/setup_test.go
index c85e37a42..bf2ac3c3d 100644
--- a/plugin/log/setup_test.go
+++ b/plugin/log/setup_test.go
@@ -94,16 +94,13 @@ func TestLogParse(t *testing.T) {
}}},
{`log {
class abracadabra
- }`, true, []Rule{
- }},
+ }`, true, []Rule{}},
{`log {
class
- }`, true, []Rule{
- }},
+ }`, true, []Rule{}},
{`log {
unknown
- }`, true, []Rule{
- }},
+ }`, true, []Rule{}},
}
for i, test := range tests {
c := caddy.NewTestController("dns", test.inputLogRules)
diff --git a/plugin/metrics/context.go b/plugin/metrics/context.go
index ac3010c71..fa2e75194 100644
--- a/plugin/metrics/context.go
+++ b/plugin/metrics/context.go
@@ -3,7 +3,7 @@ package metrics
import (
"github.com/coredns/coredns/plugin/metrics/vars"
- "golang.org/x/net/context"
+ "context"
)
// WithServer returns the current server handling the request. It returns the
diff --git a/plugin/metrics/handler.go b/plugin/metrics/handler.go
index 1c9517bac..6d11d5cb8 100644
--- a/plugin/metrics/handler.go
+++ b/plugin/metrics/handler.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/rcode"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// ServeDNS implements the Handler interface.
diff --git a/plugin/metrics/metrics_test.go b/plugin/metrics/metrics_test.go
index f3e4ba3d8..5cdbb448c 100644
--- a/plugin/metrics/metrics_test.go
+++ b/plugin/metrics/metrics_test.go
@@ -8,8 +8,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestMetrics(t *testing.T) {
diff --git a/plugin/metrics/vars/report.go b/plugin/metrics/vars/report.go
index dc597c610..8f1926381 100644
--- a/plugin/metrics/vars/report.go
+++ b/plugin/metrics/vars/report.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Report reports the metrics data associcated with request.
diff --git a/plugin/nsid/nsid.go b/plugin/nsid/nsid.go
index ebd3a48dc..f5d655a61 100644
--- a/plugin/nsid/nsid.go
+++ b/plugin/nsid/nsid.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Nsid plugin
diff --git a/plugin/nsid/nsid_test.go b/plugin/nsid/nsid_test.go
index 143d40cba..549192e7c 100644
--- a/plugin/nsid/nsid_test.go
+++ b/plugin/nsid/nsid_test.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/test"
"github.com/coredns/coredns/plugin/whoami"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestNsid(t *testing.T) {
diff --git a/plugin/pkg/fuzz/do.go b/plugin/pkg/fuzz/do.go
index d4ef87117..b19cb0cc3 100644
--- a/plugin/pkg/fuzz/do.go
+++ b/plugin/pkg/fuzz/do.go
@@ -5,8 +5,9 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Do will fuzz p - used by gofuzz. See Maefile.fuzz for comments and context.
diff --git a/plugin/plugin.go b/plugin/plugin.go
index b3d5cc6ab..a11944f13 100644
--- a/plugin/plugin.go
+++ b/plugin/plugin.go
@@ -5,10 +5,11 @@ import (
"errors"
"fmt"
+ "context"
+
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
"github.com/prometheus/client_golang/prometheus"
- "golang.org/x/net/context"
)
type (
diff --git a/plugin/proxy/dns.go b/plugin/proxy/dns.go
index bbff3ba4a..f555b0d29 100644
--- a/plugin/proxy/dns.go
+++ b/plugin/proxy/dns.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type dnsEx struct {
diff --git a/plugin/proxy/dnstap.go b/plugin/proxy/dnstap.go
index 9633060b8..8611c8254 100644
--- a/plugin/proxy/dnstap.go
+++ b/plugin/proxy/dnstap.go
@@ -7,9 +7,10 @@ import (
"github.com/coredns/coredns/plugin/dnstap/msg"
"github.com/coredns/coredns/request"
+ "context"
+
tap "github.com/dnstap/golang-dnstap"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func toDnstap(ctx context.Context, host string, ex Exchanger, state request.Request, reply *dns.Msg, start time.Time) error {
diff --git a/plugin/proxy/dnstap_test.go b/plugin/proxy/dnstap_test.go
index 83696921a..ffee1d470 100644
--- a/plugin/proxy/dnstap_test.go
+++ b/plugin/proxy/dnstap_test.go
@@ -9,9 +9,10 @@ import (
mwtest "github.com/coredns/coredns/plugin/test"
"github.com/coredns/coredns/request"
+ "context"
+
tap "github.com/dnstap/golang-dnstap"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func testCase(t *testing.T, ex Exchanger, q, r *dns.Msg, datq, datr *msg.Builder) {
diff --git a/plugin/proxy/exchanger.go b/plugin/proxy/exchanger.go
index 283022dae..c0d4f7227 100644
--- a/plugin/proxy/exchanger.go
+++ b/plugin/proxy/exchanger.go
@@ -3,8 +3,9 @@ package proxy
import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Exchanger is an interface that specifies a type implementing a DNS resolver that
diff --git a/plugin/proxy/google.go b/plugin/proxy/google.go
index 9192ce83b..85591061e 100644
--- a/plugin/proxy/google.go
+++ b/plugin/proxy/google.go
@@ -14,8 +14,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type google struct {
diff --git a/plugin/proxy/grpc.go b/plugin/proxy/grpc.go
index 334cd5264..8b596c89a 100644
--- a/plugin/proxy/grpc.go
+++ b/plugin/proxy/grpc.go
@@ -9,10 +9,11 @@ import (
"github.com/coredns/coredns/plugin/pkg/trace"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc"
"github.com/miekg/dns"
opentracing "github.com/opentracing/opentracing-go"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
diff --git a/plugin/proxy/grpc_test.go b/plugin/proxy/grpc_test.go
index 0dd4e70fd..1deee60ab 100644
--- a/plugin/proxy/grpc_test.go
+++ b/plugin/proxy/grpc_test.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/test"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
"google.golang.org/grpc/grpclog"
)
diff --git a/plugin/proxy/lookup.go b/plugin/proxy/lookup.go
index 372ad1500..bd4952bdd 100644
--- a/plugin/proxy/lookup.go
+++ b/plugin/proxy/lookup.go
@@ -11,8 +11,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/healthcheck"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// NewLookup create a new proxy with the hosts in host and a Random policy.
diff --git a/plugin/proxy/proxy.go b/plugin/proxy/proxy.go
index eae9953df..042ac0578 100644
--- a/plugin/proxy/proxy.go
+++ b/plugin/proxy/proxy.go
@@ -13,9 +13,10 @@ import (
"github.com/coredns/coredns/plugin/pkg/healthcheck"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
- "golang.org/x/net/context"
)
var (
diff --git a/plugin/reverse/reverse.go b/plugin/reverse/reverse.go
index 8b9e403d5..ff30d9ee7 100644
--- a/plugin/reverse/reverse.go
+++ b/plugin/reverse/reverse.go
@@ -8,8 +8,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/fall"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Reverse provides dynamic reverse DNS and the related forward RR.
diff --git a/plugin/reverse/reverse_test.go b/plugin/reverse/reverse_test.go
index da0997c1c..62985745e 100644
--- a/plugin/reverse/reverse_test.go
+++ b/plugin/reverse/reverse_test.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestReverse(t *testing.T) {
diff --git a/plugin/rewrite/reverter_test.go b/plugin/rewrite/reverter_test.go
index 7ab0613bd..495650c35 100644
--- a/plugin/rewrite/reverter_test.go
+++ b/plugin/rewrite/reverter_test.go
@@ -7,8 +7,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestResponseReverter(t *testing.T) {
diff --git a/plugin/rewrite/rewrite.go b/plugin/rewrite/rewrite.go
index bd715ad4f..c6b618038 100644
--- a/plugin/rewrite/rewrite.go
+++ b/plugin/rewrite/rewrite.go
@@ -8,7 +8,7 @@ import (
"github.com/miekg/dns"
- "golang.org/x/net/context"
+ "context"
)
// Result is the result of a rewrite
diff --git a/plugin/rewrite/rewrite_test.go b/plugin/rewrite/rewrite_test.go
index 24e125bea..1c87dba05 100644
--- a/plugin/rewrite/rewrite_test.go
+++ b/plugin/rewrite/rewrite_test.go
@@ -9,8 +9,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func msgPrinter(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
diff --git a/plugin/route53/route53.go b/plugin/route53/route53.go
index c40c56db3..66adcbb9a 100644
--- a/plugin/route53/route53.go
+++ b/plugin/route53/route53.go
@@ -8,11 +8,12 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/aws/aws-sdk-go/service/route53/route53iface"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Route53 is a plugin that returns RR from AWS route53
diff --git a/plugin/route53/route53_test.go b/plugin/route53/route53_test.go
index a543231c1..4ad9171cc 100644
--- a/plugin/route53/route53_test.go
+++ b/plugin/route53/route53_test.go
@@ -6,11 +6,12 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/aws/aws-sdk-go/service/route53/route53iface"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type mockedRoute53 struct {
diff --git a/plugin/template/template.go b/plugin/template/template.go
index 0320d4c60..62aefcf7a 100644
--- a/plugin/template/template.go
+++ b/plugin/template/template.go
@@ -11,8 +11,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/upstream"
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Handler is a plugin handler that takes a query and templates a response.
diff --git a/plugin/template/template_test.go b/plugin/template/template_test.go
index 969cd6a27..466ac7982 100644
--- a/plugin/template/template_test.go
+++ b/plugin/template/template_test.go
@@ -10,9 +10,10 @@ import (
"github.com/coredns/coredns/plugin/pkg/fall"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/mholt/caddy"
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestHandler(t *testing.T) {
diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go
index e22cbf2d1..7ac81f361 100644
--- a/plugin/test/helpers.go
+++ b/plugin/test/helpers.go
@@ -4,8 +4,9 @@ import (
"sort"
"testing"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
type sect int
diff --git a/plugin/trace/trace.go b/plugin/trace/trace.go
index ffcaa760c..f71615f33 100644
--- a/plugin/trace/trace.go
+++ b/plugin/trace/trace.go
@@ -11,11 +11,12 @@ import (
// Plugin the trace package.
_ "github.com/coredns/coredns/plugin/pkg/trace"
+ "context"
+
ddtrace "github.com/DataDog/dd-trace-go/opentracing"
"github.com/miekg/dns"
ot "github.com/opentracing/opentracing-go"
zipkin "github.com/openzipkin/zipkin-go-opentracing"
- "golang.org/x/net/context"
)
type trace struct {
diff --git a/plugin/whoami/whoami.go b/plugin/whoami/whoami.go
index 0a14bd61f..c28629a6f 100644
--- a/plugin/whoami/whoami.go
+++ b/plugin/whoami/whoami.go
@@ -8,8 +8,9 @@ import (
"github.com/coredns/coredns/request"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
// Whoami is a plugin that returns your IP address, port and the protocol used for connecting
diff --git a/plugin/whoami/whoami_test.go b/plugin/whoami/whoami_test.go
index 02a6e1e6e..7b32ebd41 100644
--- a/plugin/whoami/whoami_test.go
+++ b/plugin/whoami/whoami_test.go
@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
+ "context"
+
"github.com/miekg/dns"
- "golang.org/x/net/context"
)
func TestWhoami(t *testing.T) {