Fix go fmt, go lint, and go vet issues (#494)

This fix fixes several `go fmt`, `go lint`, and `go vet` issues,
to make goreportcard happy:

https://goreportcard.com/report/github.com/miekg/coredns

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2017-01-29 12:06:26 -08:00
committed by Miek Gieben
parent bc301be5ee
commit 738067a3c7
8 changed files with 38 additions and 32 deletions

View File

@@ -70,7 +70,7 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
state := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)}
resp, err := p.Lookup(state, "example.com.", dns.TypeA)
if err != nil {
t.Fatalf("Expected to receive reply, but didn't", err)
t.Fatalf("Expected to receive reply, but didn't: %v", err)
}
if len(resp.Answer) == 0 {
t.Fatalf("Expected to at least one RR in the answer section, got none")
@@ -79,7 +79,7 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
t.Errorf("Expected RR to A, got: %d", resp.Answer[0].Header().Rrtype)
}
if resp.Answer[0].(*dns.A).A.String() != "93.184.216.34" {
t.Errorf("Expected 93.184.216.34, got: %d", resp.Answer[0].(*dns.A).A.String())
t.Errorf("Expected 93.184.216.34, got: %s", resp.Answer[0].(*dns.A).A.String())
}
}