Commit f91cb610 authored by Miek Gieben's avatar Miek Gieben Committed by John Belamaric

Don't use standard lib context package (#1468)

With Go 1.9 you *can* include the std lib's context package and nothing
breaks. However we never officially made the move (and grpc also doesn't
ues the std lib's one).

Standardize all plugins on using the extern context package.

Fixes #1466
parent 449bb1ac
......@@ -3,7 +3,6 @@
package etcd
import (
"context"
"encoding/json"
"testing"
"time"
......@@ -16,6 +15,7 @@ import (
etcdc "github.com/coreos/etcd/client"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
func init() {
......
package proxy
import (
"context"
"net"
"time"
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type dnsEx struct {
......
package proxy
import (
"context"
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
// Exchanger is an interface that specifies a type implementing a DNS resolver that
......
package proxy
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
......@@ -16,6 +15,7 @@ import (
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
type google struct {
......
package proxy
import (
"context"
"crypto/tls"
"log"
......@@ -12,6 +11,7 @@ import (
"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"
)
......
......@@ -3,7 +3,6 @@ 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"
......@@ -13,6 +12,7 @@ import (
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
// NewLookup create a new proxy with the hosts in host and a Random policy.
......
......@@ -2,7 +2,6 @@ package template
import (
"bytes"
"context"
"regexp"
"strconv"
gotmpl "text/template"
......@@ -12,6 +11,7 @@ import (
"github.com/coredns/coredns/request"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
// Handler is a plugin handler that takes a query and templates a response.
......
package template
import (
"context"
"fmt"
"regexp"
"testing"
......@@ -13,6 +12,7 @@ import (
"github.com/mholt/caddy"
"github.com/miekg/dns"
"golang.org/x/net/context"
)
func TestHandler(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