From 7f018234f6b1629f922901a7fd800612a7abfc69 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Mon, 5 Nov 2018 23:52:11 +0300 Subject: [PATCH] goimports files --- upstream/dns_upstream.go | 3 ++- upstream/helpers.go | 5 +++-- upstream/https_upstream.go | 9 +++++---- upstream/setup.go | 3 ++- upstream/setup_test.go | 3 ++- upstream/upstream.go | 3 ++- upstream/upstream_test.go | 5 +++-- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/upstream/dns_upstream.go b/upstream/dns_upstream.go index e7c2e7bd..89584e11 100644 --- a/upstream/dns_upstream.go +++ b/upstream/dns_upstream.go @@ -2,9 +2,10 @@ package upstream import ( "crypto/tls" + "time" + "github.com/miekg/dns" "golang.org/x/net/context" - "time" ) // DnsUpstream is a very simple upstream implementation for plain DNS diff --git a/upstream/helpers.go b/upstream/helpers.go index e903f799..832d58b4 100644 --- a/upstream/helpers.go +++ b/upstream/helpers.go @@ -1,10 +1,11 @@ package upstream import ( - "github.com/miekg/dns" - "golang.org/x/net/context" "net" "strings" + + "github.com/miekg/dns" + "golang.org/x/net/context" ) // Detects the upstream type from the specified url and creates a proper Upstream object diff --git a/upstream/https_upstream.go b/upstream/https_upstream.go index ae705699..d7d7bdde 100644 --- a/upstream/https_upstream.go +++ b/upstream/https_upstream.go @@ -4,16 +4,17 @@ import ( "bytes" "crypto/tls" "fmt" - "github.com/miekg/dns" - "github.com/pkg/errors" - "golang.org/x/net/context" - "golang.org/x/net/http2" "io/ioutil" "log" "net" "net/http" "net/url" "time" + + "github.com/miekg/dns" + "github.com/pkg/errors" + "golang.org/x/net/context" + "golang.org/x/net/http2" ) const ( diff --git a/upstream/setup.go b/upstream/setup.go index e3420da4..56f5da27 100644 --- a/upstream/setup.go +++ b/upstream/setup.go @@ -1,10 +1,11 @@ package upstream import ( + "log" + "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" "github.com/mholt/caddy" - "log" ) func init() { diff --git a/upstream/setup_test.go b/upstream/setup_test.go index cff8abaf..b3918932 100644 --- a/upstream/setup_test.go +++ b/upstream/setup_test.go @@ -1,8 +1,9 @@ package upstream import ( - "github.com/mholt/caddy" "testing" + + "github.com/mholt/caddy" ) func TestSetup(t *testing.T) { diff --git a/upstream/upstream.go b/upstream/upstream.go index 6578c94e..c2ab1826 100644 --- a/upstream/upstream.go +++ b/upstream/upstream.go @@ -1,11 +1,12 @@ package upstream import ( + "time" + "github.com/coredns/coredns/plugin" "github.com/miekg/dns" "github.com/pkg/errors" "golang.org/x/net/context" - "time" ) const ( diff --git a/upstream/upstream_test.go b/upstream/upstream_test.go index 171839a5..7ce5690f 100644 --- a/upstream/upstream_test.go +++ b/upstream/upstream_test.go @@ -1,10 +1,11 @@ package upstream import ( - "github.com/miekg/dns" - "golang.org/x/net/context" "net" "testing" + + "github.com/miekg/dns" + "golang.org/x/net/context" ) func TestDnsUpstreamIsAlive(t *testing.T) {