*: clean up unused vars, functions

With help from https://github.com/dominikh/go-unused.
IsNetTimeoutError seems useful, so moved to pkg/netutil.
This commit is contained in:
Gyu-Ho Lee
2016-04-06 21:33:55 -07:00
parent 7408bc2504
commit 6e6d64fb9b
10 changed files with 11 additions and 36 deletions

View File

@@ -116,3 +116,8 @@ func URLStringsEqual(a []string, b []string) bool {
return urlsEqual(urlsA, urlsB)
}
func IsNetworkTimeoutError(err error) bool {
nerr, ok := err.(net.Error)
return ok && nerr.Timeout()
}