diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go index a6485f5ae..93e2732dc 100644 --- a/plugin/auto/auto.go +++ b/plugin/auto/auto.go @@ -2,6 +2,7 @@ package auto import ( + "context" "regexp" "time" @@ -11,8 +12,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go index d2c00b7b5..693f09e47 100644 --- a/plugin/autopath/autopath.go +++ b/plugin/autopath/autopath.go @@ -32,13 +32,13 @@ func (m Plugins ) AutoPath(state request.Request) []string { package autopath import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/plugin/pkg/nonwriter" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/autopath/autopath_test.go b/plugin/autopath/autopath_test.go index 53140932d..a92ea4573 100644 --- a/plugin/autopath/autopath_test.go +++ b/plugin/autopath/autopath_test.go @@ -1,14 +1,13 @@ package autopath import ( + "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/backend.go b/plugin/backend.go index b288f2c9a..b2d4df19e 100644 --- a/plugin/backend.go +++ b/plugin/backend.go @@ -1,12 +1,12 @@ package plugin import ( + "context" + "github.com/coredns/coredns/plugin/etcd/msg" "github.com/coredns/coredns/request" "github.com/miekg/dns" - - "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 0531d1c33..131803ea7 100644 --- a/plugin/cache/cache_test.go +++ b/plugin/cache/cache_test.go @@ -1,11 +1,10 @@ package cache import ( + "context" "testing" "time" - "context" - "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/response" "github.com/coredns/coredns/plugin/test" diff --git a/plugin/cache/handler.go b/plugin/cache/handler.go index 988b13c4a..d6ed0dcad 100644 --- a/plugin/cache/handler.go +++ b/plugin/cache/handler.go @@ -1,6 +1,7 @@ package cache import ( + "context" "math" "sync" "time" @@ -8,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" "github.com/prometheus/client_golang/prometheus" ) diff --git a/plugin/cache/prefech_test.go b/plugin/cache/prefech_test.go index 1f32396e1..36d5c11fa 100644 --- a/plugin/cache/prefech_test.go +++ b/plugin/cache/prefech_test.go @@ -1,6 +1,7 @@ package cache import ( + "context" "fmt" "testing" "time" @@ -8,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" - "context" - "github.com/coredns/coredns/plugin/test" "github.com/miekg/dns" ) diff --git a/plugin/cache/spoof_test.go b/plugin/cache/spoof_test.go index a855d8fab..e9c618f03 100644 --- a/plugin/cache/spoof_test.go +++ b/plugin/cache/spoof_test.go @@ -1,13 +1,12 @@ package cache import ( + "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" - "context" - "github.com/coredns/coredns/plugin/test" "github.com/miekg/dns" ) diff --git a/plugin/chaos/chaos.go b/plugin/chaos/chaos.go index 2221499c2..60b002bdb 100644 --- a/plugin/chaos/chaos.go +++ b/plugin/chaos/chaos.go @@ -2,13 +2,12 @@ package chaos import ( + "context" "os" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/chaos/chaos_test.go b/plugin/chaos/chaos_test.go index ce42ce7c4..bb58c07b4 100644 --- a/plugin/chaos/chaos_test.go +++ b/plugin/chaos/chaos_test.go @@ -1,14 +1,13 @@ package chaos import ( + "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/dnssec/handler.go b/plugin/dnssec/handler.go index 0137720c2..b24c33e7a 100644 --- a/plugin/dnssec/handler.go +++ b/plugin/dnssec/handler.go @@ -1,13 +1,12 @@ package dnssec import ( + "context" "sync" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" "github.com/prometheus/client_golang/prometheus" ) diff --git a/plugin/dnssec/handler_test.go b/plugin/dnssec/handler_test.go index 228bf83c9..d2d566af9 100644 --- a/plugin/dnssec/handler_test.go +++ b/plugin/dnssec/handler_test.go @@ -1,6 +1,7 @@ package dnssec import ( + "context" "strings" "testing" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/dnstap/handler.go b/plugin/dnstap/handler.go index c7318c47a..1c411e2aa 100644 --- a/plugin/dnstap/handler.go +++ b/plugin/dnstap/handler.go @@ -1,13 +1,12 @@ package dnstap import ( + "context" "time" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/dnstap/taprw" - "context" - tap "github.com/dnstap/golang-dnstap" "github.com/miekg/dns" ) diff --git a/plugin/dnstap/handler_test.go b/plugin/dnstap/handler_test.go index 231aca500..003a385c8 100644 --- a/plugin/dnstap/handler_test.go +++ b/plugin/dnstap/handler_test.go @@ -1,6 +1,7 @@ package dnstap import ( + "context" "errors" "net" "strings" @@ -9,9 +10,6 @@ import ( "github.com/coredns/coredns/plugin" "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" ) diff --git a/plugin/dnstap/test/helpers.go b/plugin/dnstap/test/helpers.go index 3e43970a6..4f71a5a83 100644 --- a/plugin/dnstap/test/helpers.go +++ b/plugin/dnstap/test/helpers.go @@ -1,13 +1,12 @@ package test import ( + "context" "net" "reflect" "github.com/coredns/coredns/plugin/dnstap/msg" - "context" - tap "github.com/dnstap/golang-dnstap" ) diff --git a/plugin/erratic/erratic.go b/plugin/erratic/erratic.go index b45b05a47..f763f8a67 100644 --- a/plugin/erratic/erratic.go +++ b/plugin/erratic/erratic.go @@ -2,13 +2,12 @@ package erratic import ( + "context" "sync/atomic" "time" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/erratic/erratic_test.go b/plugin/erratic/erratic_test.go index 452ac42f7..8a3b4e011 100644 --- a/plugin/erratic/erratic_test.go +++ b/plugin/erratic/erratic_test.go @@ -1,13 +1,12 @@ package erratic import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/errors/errors.go b/plugin/errors/errors.go index 1d7c4256b..a8724f44b 100644 --- a/plugin/errors/errors.go +++ b/plugin/errors/errors.go @@ -2,6 +2,7 @@ package errors import ( + "context" "fmt" "log" "runtime" @@ -11,8 +12,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/errors/errors_test.go b/plugin/errors/errors_test.go index bc78f13d5..f3857df56 100644 --- a/plugin/errors/errors_test.go +++ b/plugin/errors/errors_test.go @@ -2,6 +2,7 @@ package errors import ( "bytes" + "context" "errors" "fmt" "log" @@ -12,8 +13,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/etcd/etcd.go b/plugin/etcd/etcd.go index 2887b041e..fc4542bfe 100644 --- a/plugin/etcd/etcd.go +++ b/plugin/etcd/etcd.go @@ -2,6 +2,7 @@ package etcd import ( + "context" "encoding/json" "fmt" "strings" @@ -13,8 +14,6 @@ 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" diff --git a/plugin/etcd/handler.go b/plugin/etcd/handler.go index fa1a14e82..ebd73d946 100644 --- a/plugin/etcd/handler.go +++ b/plugin/etcd/handler.go @@ -1,12 +1,12 @@ package etcd import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/etcd/lookup_test.go b/plugin/etcd/lookup_test.go index 2779d720b..934140367 100644 --- a/plugin/etcd/lookup_test.go +++ b/plugin/etcd/lookup_test.go @@ -3,6 +3,7 @@ package etcd import ( + "context" "encoding/json" "testing" "time" @@ -14,8 +15,6 @@ import ( "github.com/coredns/coredns/plugin/proxy" "github.com/coredns/coredns/plugin/test" - "context" - etcdc "github.com/coreos/etcd/client" "github.com/miekg/dns" ) diff --git a/plugin/etcd/setup.go b/plugin/etcd/setup.go index 68365a03d..6b83ebc37 100644 --- a/plugin/etcd/setup.go +++ b/plugin/etcd/setup.go @@ -1,6 +1,7 @@ package etcd import ( + "context" "crypto/tls" "github.com/coredns/coredns/core/dnsserver" @@ -9,8 +10,6 @@ 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" ) diff --git a/plugin/etcd/stub_handler.go b/plugin/etcd/stub_handler.go index 637d2891a..92a0103c5 100644 --- a/plugin/etcd/stub_handler.go +++ b/plugin/etcd/stub_handler.go @@ -1,13 +1,12 @@ package etcd import ( + "context" "errors" "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/etcd/xfr.go b/plugin/etcd/xfr.go index bf4ab95d6..358ff7a38 100644 --- a/plugin/etcd/xfr.go +++ b/plugin/etcd/xfr.go @@ -1,11 +1,11 @@ package etcd import ( + "context" "time" - "context" - "github.com/coredns/coredns/request" + "github.com/miekg/dns" ) diff --git a/plugin/federation/federation.go b/plugin/federation/federation.go index fbf46eabd..c9cafc420 100644 --- a/plugin/federation/federation.go +++ b/plugin/federation/federation.go @@ -14,14 +14,14 @@ Federation is only useful in conjunction with the kubernetes plugin, without it package federation import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/etcd/msg" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/plugin/pkg/nonwriter" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/federation/federation_test.go b/plugin/federation/federation_test.go index 55d5f3c1b..54a9c3505 100644 --- a/plugin/federation/federation_test.go +++ b/plugin/federation/federation_test.go @@ -1,14 +1,13 @@ package federation import ( + "context" "testing" "github.com/coredns/coredns/plugin/kubernetes" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/cname_test.go b/plugin/file/cname_test.go index 8721cfed6..0bc907b1f 100644 --- a/plugin/file/cname_test.go +++ b/plugin/file/cname_test.go @@ -1,6 +1,7 @@ package file import ( + "context" "strings" "testing" @@ -8,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/delegation_test.go b/plugin/file/delegation_test.go index e084e1c5a..116b6b244 100644 --- a/plugin/file/delegation_test.go +++ b/plugin/file/delegation_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/dname_test.go b/plugin/file/dname_test.go index 5e4f8be99..9dd2c2e24 100644 --- a/plugin/file/dname_test.go +++ b/plugin/file/dname_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/dnssec_test.go b/plugin/file/dnssec_test.go index fb3ca05ab..29cd9a61e 100644 --- a/plugin/file/dnssec_test.go +++ b/plugin/file/dnssec_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/ds_test.go b/plugin/file/ds_test.go index 645cdbd82..5e4ed7e4c 100644 --- a/plugin/file/ds_test.go +++ b/plugin/file/ds_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/ent_test.go b/plugin/file/ent_test.go index 558fe7d97..15b79c36a 100644 --- a/plugin/file/ent_test.go +++ b/plugin/file/ent_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/file.go b/plugin/file/file.go index 1fd5737c1..cc77da81c 100644 --- a/plugin/file/file.go +++ b/plugin/file/file.go @@ -2,6 +2,7 @@ package file import ( + "context" "fmt" "io" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/glue_test.go b/plugin/file/glue_test.go index 29744f043..9cb71a993 100644 --- a/plugin/file/glue_test.go +++ b/plugin/file/glue_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/lookup_test.go b/plugin/file/lookup_test.go index d75157369..5c88247bc 100644 --- a/plugin/file/lookup_test.go +++ b/plugin/file/lookup_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/wildcard_test.go b/plugin/file/wildcard_test.go index e90f833e1..8f73d1543 100644 --- a/plugin/file/wildcard_test.go +++ b/plugin/file/wildcard_test.go @@ -1,14 +1,13 @@ package file import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/file/xfr.go b/plugin/file/xfr.go index 0ee985eb9..af179ac4e 100644 --- a/plugin/file/xfr.go +++ b/plugin/file/xfr.go @@ -1,14 +1,13 @@ package file import ( + "context" "fmt" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/forward/connect.go b/plugin/forward/connect.go index 6ea7913e5..40c9d62ca 100644 --- a/plugin/forward/connect.go +++ b/plugin/forward/connect.go @@ -5,6 +5,7 @@ package forward import ( + "context" "io" "strconv" "sync/atomic" @@ -12,8 +13,6 @@ import ( "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go index 213b30f8b..84339d4bd 100644 --- a/plugin/forward/forward.go +++ b/plugin/forward/forward.go @@ -5,6 +5,7 @@ package forward import ( + "context" "crypto/tls" "errors" "time" @@ -12,8 +13,6 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ot "github.com/opentracing/opentracing-go" ) diff --git a/plugin/forward/health_test.go b/plugin/forward/health_test.go index 8b238aa10..0588f1454 100644 --- a/plugin/forward/health_test.go +++ b/plugin/forward/health_test.go @@ -1,6 +1,7 @@ package forward import ( + "context" "sync/atomic" "testing" "time" @@ -8,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/forward/lookup.go b/plugin/forward/lookup.go index b3aa41984..a10d3004e 100644 --- a/plugin/forward/lookup.go +++ b/plugin/forward/lookup.go @@ -5,10 +5,10 @@ package forward import ( - "github.com/coredns/coredns/request" - "context" + "github.com/coredns/coredns/request" + "github.com/miekg/dns" ) diff --git a/plugin/hosts/hosts.go b/plugin/hosts/hosts.go index 9385f2c37..74b6cfe31 100644 --- a/plugin/hosts/hosts.go +++ b/plugin/hosts/hosts.go @@ -1,14 +1,14 @@ package hosts import ( - "net" - "context" + "net" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/plugin/pkg/fall" "github.com/coredns/coredns/request" + "github.com/miekg/dns" ) diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go index 67a071d9a..db3876132 100644 --- a/plugin/hosts/hosts_test.go +++ b/plugin/hosts/hosts_test.go @@ -1,14 +1,13 @@ package hosts import ( + "context" "strings" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/handler.go b/plugin/kubernetes/handler.go index 680b400d3..2aaf96c46 100644 --- a/plugin/kubernetes/handler.go +++ b/plugin/kubernetes/handler.go @@ -1,12 +1,12 @@ package kubernetes import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/handler_pod_disabled_test.go b/plugin/kubernetes/handler_pod_disabled_test.go index f61f23305..dc1f1083f 100644 --- a/plugin/kubernetes/handler_pod_disabled_test.go +++ b/plugin/kubernetes/handler_pod_disabled_test.go @@ -1,13 +1,12 @@ package kubernetes import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/handler_pod_insecure_test.go b/plugin/kubernetes/handler_pod_insecure_test.go index e14f0e73e..160ba451d 100644 --- a/plugin/kubernetes/handler_pod_insecure_test.go +++ b/plugin/kubernetes/handler_pod_insecure_test.go @@ -1,13 +1,12 @@ package kubernetes import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/handler_pod_verified_test.go b/plugin/kubernetes/handler_pod_verified_test.go index e8b3b65a3..c2b733280 100644 --- a/plugin/kubernetes/handler_pod_verified_test.go +++ b/plugin/kubernetes/handler_pod_verified_test.go @@ -1,13 +1,12 @@ package kubernetes import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go index 0f210396e..c61f67544 100644 --- a/plugin/kubernetes/handler_test.go +++ b/plugin/kubernetes/handler_test.go @@ -1,14 +1,13 @@ package kubernetes import ( + "context" "testing" "time" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" 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 f923da51d..da408472f 100644 --- a/plugin/kubernetes/kubernetes_apex_test.go +++ b/plugin/kubernetes/kubernetes_apex_test.go @@ -1,13 +1,12 @@ package kubernetes import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/kubernetes/reverse_test.go b/plugin/kubernetes/reverse_test.go index b43b81422..2cf41de1a 100644 --- a/plugin/kubernetes/reverse_test.go +++ b/plugin/kubernetes/reverse_test.go @@ -1,13 +1,12 @@ package kubernetes import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" 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 b010494db..df1058dda 100644 --- a/plugin/kubernetes/xfr.go +++ b/plugin/kubernetes/xfr.go @@ -1,6 +1,7 @@ package kubernetes import ( + "context" "math" "net" "strings" @@ -10,8 +11,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" api "k8s.io/api/core/v1" ) diff --git a/plugin/kubernetes/xfr_test.go b/plugin/kubernetes/xfr_test.go index 83602c112..6ce7e789f 100644 --- a/plugin/kubernetes/xfr_test.go +++ b/plugin/kubernetes/xfr_test.go @@ -1,11 +1,10 @@ package kubernetes import ( + "context" "strings" "testing" - "context" - "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" api "k8s.io/api/core/v1" diff --git a/plugin/loadbalance/handler.go b/plugin/loadbalance/handler.go index 727487dec..4ec79c098 100644 --- a/plugin/loadbalance/handler.go +++ b/plugin/loadbalance/handler.go @@ -2,10 +2,10 @@ package loadbalance import ( - "github.com/coredns/coredns/plugin" - "context" + "github.com/coredns/coredns/plugin" + "github.com/miekg/dns" ) diff --git a/plugin/loadbalance/loadbalance_test.go b/plugin/loadbalance/loadbalance_test.go index 6586cbcd8..d5f62af0c 100644 --- a/plugin/loadbalance/loadbalance_test.go +++ b/plugin/loadbalance/loadbalance_test.go @@ -1,14 +1,13 @@ package loadbalance import ( + "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/log/log.go b/plugin/log/log.go index c60e790ce..f52a70344 100644 --- a/plugin/log/log.go +++ b/plugin/log/log.go @@ -2,6 +2,7 @@ package log import ( + "context" "log" "time" @@ -13,8 +14,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/response" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/log/log_test.go b/plugin/log/log_test.go index 5efbbd68a..484135cd5 100644 --- a/plugin/log/log_test.go +++ b/plugin/log/log_test.go @@ -2,6 +2,7 @@ package log import ( "bytes" + "context" "log" "strings" "testing" @@ -10,8 +11,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/response" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/metrics/context.go b/plugin/metrics/context.go index fa2e75194..7ee25ef4a 100644 --- a/plugin/metrics/context.go +++ b/plugin/metrics/context.go @@ -1,9 +1,9 @@ package metrics import ( - "github.com/coredns/coredns/plugin/metrics/vars" - "context" + + "github.com/coredns/coredns/plugin/metrics/vars" ) // WithServer returns the current server handling the request. It returns the diff --git a/plugin/metrics/handler.go b/plugin/metrics/handler.go index 6d11d5cb8..71132c274 100644 --- a/plugin/metrics/handler.go +++ b/plugin/metrics/handler.go @@ -1,14 +1,14 @@ package metrics import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/metrics/vars" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/pkg/rcode" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/metrics/metrics_test.go b/plugin/metrics/metrics_test.go index bc1e3beb5..211abdb23 100644 --- a/plugin/metrics/metrics_test.go +++ b/plugin/metrics/metrics_test.go @@ -1,6 +1,7 @@ package metrics import ( + "context" "testing" "github.com/coredns/coredns/plugin" @@ -8,8 +9,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/metrics/vars/report.go b/plugin/metrics/vars/report.go index 8f1926381..8b619a5f9 100644 --- a/plugin/metrics/vars/report.go +++ b/plugin/metrics/vars/report.go @@ -1,13 +1,12 @@ package vars import ( + "context" "time" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/nsid/nsid.go b/plugin/nsid/nsid.go index f5d655a61..b79df75bb 100644 --- a/plugin/nsid/nsid.go +++ b/plugin/nsid/nsid.go @@ -2,12 +2,11 @@ package nsid import ( + "context" "encoding/hex" "github.com/coredns/coredns/plugin" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/nsid/nsid_test.go b/plugin/nsid/nsid_test.go index 549192e7c..32e8d8d59 100644 --- a/plugin/nsid/nsid_test.go +++ b/plugin/nsid/nsid_test.go @@ -1,6 +1,7 @@ package nsid import ( + "context" "encoding/hex" "testing" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/test" "github.com/coredns/coredns/plugin/whoami" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/pkg/fuzz/do.go b/plugin/pkg/fuzz/do.go index b19cb0cc3..dfb046b25 100644 --- a/plugin/pkg/fuzz/do.go +++ b/plugin/pkg/fuzz/do.go @@ -2,11 +2,11 @@ package fuzz import ( + "context" + "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/plugin.go b/plugin/plugin.go index a11944f13..65bf939f1 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -2,11 +2,10 @@ package plugin import ( + "context" "errors" "fmt" - "context" - "github.com/miekg/dns" ot "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" diff --git a/plugin/proxy/dns.go b/plugin/proxy/dns.go index f555b0d29..04245ec46 100644 --- a/plugin/proxy/dns.go +++ b/plugin/proxy/dns.go @@ -1,13 +1,12 @@ package proxy import ( + "context" "net" "time" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/proxy/dnstap.go b/plugin/proxy/dnstap.go index 8611c8254..4e5a8bd40 100644 --- a/plugin/proxy/dnstap.go +++ b/plugin/proxy/dnstap.go @@ -1,14 +1,13 @@ package proxy import ( + "context" "time" "github.com/coredns/coredns/plugin/dnstap" "github.com/coredns/coredns/plugin/dnstap/msg" "github.com/coredns/coredns/request" - "context" - tap "github.com/dnstap/golang-dnstap" "github.com/miekg/dns" ) diff --git a/plugin/proxy/dnstap_test.go b/plugin/proxy/dnstap_test.go index ffee1d470..b31ed451b 100644 --- a/plugin/proxy/dnstap_test.go +++ b/plugin/proxy/dnstap_test.go @@ -1,6 +1,7 @@ package proxy import ( + "context" "testing" "time" @@ -9,8 +10,6 @@ import ( mwtest "github.com/coredns/coredns/plugin/test" "github.com/coredns/coredns/request" - "context" - tap "github.com/dnstap/golang-dnstap" "github.com/miekg/dns" ) diff --git a/plugin/proxy/exchanger.go b/plugin/proxy/exchanger.go index c0d4f7227..e96dac5a4 100644 --- a/plugin/proxy/exchanger.go +++ b/plugin/proxy/exchanger.go @@ -1,10 +1,10 @@ package proxy import ( - "github.com/coredns/coredns/request" - "context" + "github.com/coredns/coredns/request" + "github.com/miekg/dns" ) diff --git a/plugin/proxy/google.go b/plugin/proxy/google.go index 85591061e..9fc824092 100644 --- a/plugin/proxy/google.go +++ b/plugin/proxy/google.go @@ -1,6 +1,7 @@ package proxy import ( + "context" "crypto/tls" "encoding/json" "fmt" @@ -14,8 +15,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/log" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/proxy/grpc.go b/plugin/proxy/grpc.go index 8b596c89a..905fa729d 100644 --- a/plugin/proxy/grpc.go +++ b/plugin/proxy/grpc.go @@ -1,6 +1,7 @@ package proxy import ( + "context" "crypto/tls" "fmt" @@ -9,8 +10,6 @@ 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" diff --git a/plugin/proxy/grpc_test.go b/plugin/proxy/grpc_test.go index 1deee60ab..976ac3299 100644 --- a/plugin/proxy/grpc_test.go +++ b/plugin/proxy/grpc_test.go @@ -1,6 +1,7 @@ package proxy import ( + "context" "fmt" "testing" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/test" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" "google.golang.org/grpc/grpclog" ) diff --git a/plugin/proxy/lookup.go b/plugin/proxy/lookup.go index bd4952bdd..44bee4b0e 100644 --- a/plugin/proxy/lookup.go +++ b/plugin/proxy/lookup.go @@ -3,6 +3,7 @@ package proxy // functions other plugin might want to use to do lookup in the same style as the proxy. import ( + "context" "fmt" "net" "sync/atomic" @@ -11,8 +12,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/healthcheck" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/proxy/proxy.go b/plugin/proxy/proxy.go index 042ac0578..5aeaa2a54 100644 --- a/plugin/proxy/proxy.go +++ b/plugin/proxy/proxy.go @@ -2,6 +2,7 @@ package proxy import ( + "context" "errors" "fmt" "net" @@ -13,8 +14,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/healthcheck" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ot "github.com/opentracing/opentracing-go" ) diff --git a/plugin/reverse/reverse.go b/plugin/reverse/reverse.go index ff30d9ee7..2d9dc94e6 100644 --- a/plugin/reverse/reverse.go +++ b/plugin/reverse/reverse.go @@ -1,15 +1,13 @@ package reverse import ( + "context" "net" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnsutil" "github.com/coredns/coredns/plugin/pkg/fall" "github.com/coredns/coredns/request" - - "context" - "github.com/miekg/dns" ) diff --git a/plugin/reverse/reverse_test.go b/plugin/reverse/reverse_test.go index 62985745e..6d07ace29 100644 --- a/plugin/reverse/reverse_test.go +++ b/plugin/reverse/reverse_test.go @@ -1,6 +1,7 @@ package reverse import ( + "context" "net" "regexp" "testing" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/rewrite/reverter_test.go b/plugin/rewrite/reverter_test.go index 495650c35..685cecac1 100644 --- a/plugin/rewrite/reverter_test.go +++ b/plugin/rewrite/reverter_test.go @@ -1,14 +1,13 @@ package rewrite import ( + "context" "testing" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/rewrite/rewrite.go b/plugin/rewrite/rewrite.go index c6b618038..522b4c0c3 100644 --- a/plugin/rewrite/rewrite.go +++ b/plugin/rewrite/rewrite.go @@ -1,14 +1,13 @@ package rewrite import ( + "context" "fmt" "strings" "github.com/coredns/coredns/plugin" "github.com/miekg/dns" - - "context" ) // Result is the result of a rewrite diff --git a/plugin/rewrite/rewrite_test.go b/plugin/rewrite/rewrite_test.go index 1c87dba05..56c446f49 100644 --- a/plugin/rewrite/rewrite_test.go +++ b/plugin/rewrite/rewrite_test.go @@ -2,6 +2,7 @@ package rewrite import ( "bytes" + "context" "reflect" "testing" @@ -9,8 +10,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/route53/route53.go b/plugin/route53/route53.go index 66adcbb9a..f51e76448 100644 --- a/plugin/route53/route53.go +++ b/plugin/route53/route53.go @@ -3,13 +3,12 @@ package route53 import ( + "context" "net" "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" diff --git a/plugin/route53/route53_test.go b/plugin/route53/route53_test.go index 4ad9171cc..60ddefcfd 100644 --- a/plugin/route53/route53_test.go +++ b/plugin/route53/route53_test.go @@ -1,13 +1,12 @@ package route53 import ( + "context" "testing" "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" diff --git a/plugin/template/template.go b/plugin/template/template.go index 62aefcf7a..13ffbc9ea 100644 --- a/plugin/template/template.go +++ b/plugin/template/template.go @@ -2,6 +2,7 @@ package template import ( "bytes" + "context" "regexp" "strconv" gotmpl "text/template" @@ -11,8 +12,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/template/template_test.go b/plugin/template/template_test.go index 466ac7982..288d833ec 100644 --- a/plugin/template/template_test.go +++ b/plugin/template/template_test.go @@ -1,6 +1,7 @@ package template import ( + "context" "fmt" "regexp" "testing" @@ -10,8 +11,6 @@ import ( "github.com/coredns/coredns/plugin/pkg/fall" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/mholt/caddy" "github.com/miekg/dns" ) diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go index 7ac81f361..97cb510f3 100644 --- a/plugin/test/helpers.go +++ b/plugin/test/helpers.go @@ -1,11 +1,10 @@ package test import ( + "context" "sort" "testing" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/trace/trace.go b/plugin/trace/trace.go index f71615f33..93b8e4989 100644 --- a/plugin/trace/trace.go +++ b/plugin/trace/trace.go @@ -2,6 +2,7 @@ package trace import ( + "context" "fmt" "strings" "sync" @@ -11,8 +12,6 @@ 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" diff --git a/plugin/whoami/whoami.go b/plugin/whoami/whoami.go index c28629a6f..45b8bc862 100644 --- a/plugin/whoami/whoami.go +++ b/plugin/whoami/whoami.go @@ -3,13 +3,12 @@ package whoami import ( + "context" "net" "strconv" "github.com/coredns/coredns/request" - "context" - "github.com/miekg/dns" ) diff --git a/plugin/whoami/whoami_test.go b/plugin/whoami/whoami_test.go index 7b32ebd41..0db207586 100644 --- a/plugin/whoami/whoami_test.go +++ b/plugin/whoami/whoami_test.go @@ -1,13 +1,12 @@ package whoami import ( + "context" "testing" "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" - "context" - "github.com/miekg/dns" )