all: gometalinter (#843)

* kubernetes/reverse: remove deadcode
* deadcode in errors and kubernetes removed
* unnecessary conversion
* constants
* proxy: time.Since()
* simplications
* static check
* Disable test/external_test
This commit is contained in:
Miek Gieben
2017-08-06 05:54:24 -07:00
committed by GitHub
parent 964f04f443
commit bcb2eb1ecc
25 changed files with 105 additions and 150 deletions

View File

@@ -97,7 +97,7 @@ func (p Proxy) lookup(state request.Request) (*dns.Msg, error) {
// Since Select() should give us "up" hosts, keep retrying
// hosts until timeout (or until we get a nil host).
for time.Now().Sub(start) < tryDuration {
for time.Since(start) < tryDuration {
host := upstream.Select()
if host == nil {
return nil, errUnreachable

View File

@@ -109,7 +109,7 @@ func (p Proxy) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
// Since Select() should give us "up" hosts, keep retrying
// hosts until timeout (or until we get a nil host).
for time.Now().Sub(start) < tryDuration {
for time.Since(start) < tryDuration {
host := upstream.Select()
if host == nil {