go.mod: upgrade staticcheck to 0.1.0

Also run go.mod and fix some staticcheck warnings.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2020-12-14 11:43:09 -08:00
committed by Josh Bleecher Snyder
parent a0a8b9d76a
commit a6cad71fb2
5 changed files with 22 additions and 67 deletions

View File

@@ -64,11 +64,11 @@ func likelyHomeRouterIPDarwinExec() (ret netaddr.IP, ok bool) {
if err == nil && isPrivateIP(ip) {
ret = ip
// We've found what we're looking for.
return stopReadingNetstatTable
return errStopReadingNetstatTable
}
return nil
})
return ret, !ret.IsZero()
}
var stopReadingNetstatTable = errors.New("found private gateway")
var errStopReadingNetstatTable = errors.New("found private gateway")