mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: 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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user