Commit 8722336f authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

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
parent 61726b37
......@@ -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
......
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"
......
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{}
......
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.
......
......@@ -18,7 +18,8 @@ import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
context "context"
grpc "google.golang.org/grpc"
)
......
......@@ -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 (
......
......@@ -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
......
......@@ -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{
......
......@@ -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.
......
......@@ -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"
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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{
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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).
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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.
......
......@@ -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() {
......
......@@ -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() {
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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{
......
......@@ -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.
......
......@@ -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{
......
......@@ -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{
......
......@@ -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{
......
......@@ -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 (
......
......@@ -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
......
......@@ -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{
......
......@@ -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{
......
......@@ -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.
......
......@@ -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 {
......
......@@ -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
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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"
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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{
......
......@@ -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{
......
......@@ -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{
......
......@@ -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"
)
......
......@@ -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{
......
......@@ -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"
)
......
......@@ -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"
)
......
......@@ -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"
......
......@@ -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".
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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)
......
......@@ -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
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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.
......
......@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
// Nsid plugin
......
......@@ -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) {
......
......@@ -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.
......
......@@ -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 (
......
......@@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/request"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type dnsEx struct {
......
......@@ -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 {
......
......@@ -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) {
......
......@@ -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
......
......@@ -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 {
......
......@@ -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"
)
......
......@@ -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"
)
......
......@@ -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.
......
......@@ -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 (
......
......@@ -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.
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -8,7 +8,7 @@ import (
"github.com/miekg/dns"
"golang.org/x/net/context"
"context"
)
// Result is the result of a rewrite
......
......@@ -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) {
......
......@@ -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
......
......@@ -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 {
......
......@@ -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.
......
......@@ -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) {
......
......@@ -4,8 +4,9 @@ import (
"sort"
"testing"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type sect int
......
......@@ -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 {
......
......@@ -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
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment