netutil: fix unused err staticcheck failure

Clears SA4006
This commit is contained in:
Anthony Romano 2017-04-07 10:43:05 -07:00
parent 7e05b33aa0
commit 88d4e7ebeb

View File

@ -150,7 +150,10 @@ func TestURLsEqual(t *testing.T) {
"second.com": "10.0.11.2",
}
resolveTCPAddr = func(network, addr string) (*net.TCPAddr, error) {
host, port, err := net.SplitHostPort(addr)
host, port, herr := net.SplitHostPort(addr)
if herr != nil {
return nil, herr
}
if _, ok := hostm[host]; !ok {
return nil, errors.New("cannot resolve host.")
}