Update go dependencies

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-04-20 10:40:17 -04:00
parent 5c5e2328ba
commit 837d370ab2
10 changed files with 123 additions and 122 deletions

View file

@ -55,6 +55,12 @@ func JoinPreservingTrailingSlash(elem ...string) string {
return result
}
// IsTimeout returns true if the given error is a network timeout error
func IsTimeout(err error) bool {
neterr, ok := err.(net.Error)
return ok && neterr != nil && neterr.Timeout()
}
// IsProbableEOF returns true if the given error resembles a connection termination
// scenario that would justify assuming that the watch is empty.
// These errors are what the Go http stack returns back to us which are general