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
This commit is contained in:
Miek Gieben 2018-04-20 11:01:06 +01:00 committed by GitHub
parent 61726b3721
commit 8722336fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 178 additions and 98 deletions

View file

@ -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

View file

@ -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"

View file

@ -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{}

View file

@ -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.

View file

@ -18,7 +18,8 @@ import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
context "context"
grpc "google.golang.org/grpc"
)

View file

@ -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 (

View file

@ -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

View file

@ -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{

View file

@ -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.

View file

@ -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"

View file

@ -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.

View file

@ -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) {

View file

@ -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) {

View file

@ -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

View file

@ -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) {

View file

@ -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.

View file

@ -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{

View file

@ -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.

View file

@ -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) {

View file

@ -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.

View file

@ -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.

View file

@ -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) {

View file

@ -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).

View file

@ -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) {

View file

@ -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.

View file

@ -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.

View file

@ -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() {

View file

@ -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() {

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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) {

View file

@ -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) {

View file

@ -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{

View file

@ -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.

View file

@ -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{

View file

@ -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{

View file

@ -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{

View file

@ -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 (

View file

@ -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

View file

@ -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{

View file

@ -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{

View file

@ -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.

View file

@ -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 {

View file

@ -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

View file

@ -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) {

View file

@ -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.

View file

@ -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"

View file

@ -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) {

View file

@ -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.

View file

@ -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{

View file

@ -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{

View file

@ -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{

View file

@ -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"
)

View file

@ -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{

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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".

View file

@ -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) {

View file

@ -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.

View file

@ -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) {

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -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) {

View file

@ -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.

View file

@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/plugin"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
// Nsid plugin

View file

@ -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) {

View file

@ -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.

View file

@ -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 (

View file

@ -6,8 +6,9 @@ import (
"github.com/coredns/coredns/request"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type dnsEx struct {

View file

@ -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 {

View file

@ -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) {

View file

@ -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

View file

@ -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 {

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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.

View file

@ -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 (

View file

@ -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.

View file

@ -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) {

View file

@ -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) {

View file

@ -8,7 +8,7 @@ import (
"github.com/miekg/dns"
"golang.org/x/net/context"
"context"
)
// Result is the result of a rewrite

View file

@ -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) {

View file

@ -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

View file

@ -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 {

View file

@ -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.

View file

@ -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) {

View file

@ -4,8 +4,9 @@ import (
"sort"
"testing"
"context"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type sect int

View file

@ -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 {

View file

@ -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

View file

@ -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) {