aboutsummaryrefslogtreecommitdiff
path: root/plugin/test/helpers.go
diff options
context:
space:
mode:
authorGravatar Nguyen Quang Huy <huynq0911@gmail.com> 2019-02-27 20:25:02 +0700
committerGravatar Chris O'Haver <cohaver@infoblox.com> 2019-02-27 08:25:02 -0500
commit42cf6606fcb44863877bd9fa8846bd0afa3ab4d2 (patch)
tree01e42ac3c15670dc96821f80e187b65fbbc4e7fb /plugin/test/helpers.go
parentc8dbfbdcd805cde8b574b764062d94e5f1b31c89 (diff)
downloadcoredns-42cf6606fcb44863877bd9fa8846bd0afa3ab4d2.tar.gz
coredns-42cf6606fcb44863877bd9fa8846bd0afa3ab4d2.tar.zst
coredns-42cf6606fcb44863877bd9fa8846bd0afa3ab4d2.zip
Fix error string should not be capitalized (#2608)
From [Golang coding convention](https://github.com/golang/go/wiki/CodeReviewComments#error-strings) Co-Authored-By: Nguyen Van Trung [trungnvfet@outlook.com](mailto:trungnvfet@outlook.com) Signed-off-by: Nguyen Quang Huy [huynq0911@gmail.com](mailto:huynq0911@gmail.com)
Diffstat (limited to 'plugin/test/helpers.go')
-rw-r--r--plugin/test/helpers.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go
index 28b48e450..eff5ed550 100644
--- a/plugin/test/helpers.go
+++ b/plugin/test/helpers.go
@@ -115,17 +115,17 @@ func OPT(bufsize int, do bool) *dns.OPT {
// Header test if the header in resp matches the header as defined in tc.
func Header(tc Case, resp *dns.Msg) error {
if resp.Rcode != tc.Rcode {
- return fmt.Errorf("Rcode is %q, expected %q", dns.RcodeToString[resp.Rcode], dns.RcodeToString[tc.Rcode])
+ return fmt.Errorf("rcode is %q, expected %q", dns.RcodeToString[resp.Rcode], dns.RcodeToString[tc.Rcode])
}
if len(resp.Answer) != len(tc.Answer) {
- return fmt.Errorf("Answer for %q contained %d results, %d expected", tc.Qname, len(resp.Answer), len(tc.Answer))
+ return fmt.Errorf("answer for %q contained %d results, %d expected", tc.Qname, len(resp.Answer), len(tc.Answer))
}
if len(resp.Ns) != len(tc.Ns) {
- return fmt.Errorf("Authority for %q contained %d results, %d expected", tc.Qname, len(resp.Ns), len(tc.Ns))
+ return fmt.Errorf("authority for %q contained %d results, %d expected", tc.Qname, len(resp.Ns), len(tc.Ns))
}
if len(resp.Extra) != len(tc.Extra) {
- return fmt.Errorf("Additional for %q contained %d results, %d expected", tc.Qname, len(resp.Extra), len(tc.Extra))
+ return fmt.Errorf("additional for %q contained %d results, %d expected", tc.Qname, len(resp.Extra), len(tc.Extra))
}
return nil
}