Fix ineffassign (#1959)

* Fix ineffassign

This fix tries to fix ineffassign, as was reported in:
https://goreportcard.com/report/github.com/coredns/coredns#ineffassign

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update setup.go

Revert this one change, so this can be merged.
This commit is contained in:
Yong Tang
2018-07-28 17:32:13 +08:00
committed by Miek Gieben
parent 62df253371
commit 54ec78c1ba
8 changed files with 10 additions and 15 deletions

View File

@@ -74,10 +74,8 @@ func TestReverse(t *testing.T) {
m := new(dns.Msg)
for i, tc := range tests {
inaddr := tc.addr
var err error
if !strings.HasSuffix(tc.addr, ".arpa.") {
inaddr, err = dns.ReverseAddr(tc.addr)
inaddr, err := dns.ReverseAddr(tc.addr)
if err != nil {
t.Fatalf("Test %d, failed to convert %s", i, tc.addr)
}
@@ -122,10 +120,8 @@ func TestReverseInAddr(t *testing.T) {
m := new(dns.Msg)
for i, tc := range tests {
inaddr := tc.addr
var err error
if !strings.HasSuffix(tc.addr, ".arpa.") {
inaddr, err = dns.ReverseAddr(tc.addr)
inaddr, err := dns.ReverseAddr(tc.addr)
if err != nil {
t.Fatalf("Test %d, failed to convert %s", i, tc.addr)
}