зеркало из https://github.com/golang/build.git
maintner: suppress spurious error message
Currently maintnerd prints 2017/06/17 15:00:16 Unknown error type <nil>: <nil> if it successfully downloads a file. It shouldn't log if there was no error. Change-Id: I01c4f2bde616d709d5c081219f9c123d6ea6a678 Reviewed-on: https://go-review.googlesource.com/46007 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
07714b07ce
Коммит
9fb5d0849b
|
@ -74,6 +74,9 @@ func (ns *netMutSource) GetMutations(ctx context.Context) <-chan MutationStreamE
|
|||
// isNoInternetError reports whether the provided error is because there's no
|
||||
// network connectivity.
|
||||
func isNoInternetError(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
switch err := err.(type) {
|
||||
case *url.Error:
|
||||
return isNoInternetError(err.Err)
|
||||
|
|
Загрузка…
Ссылка в новой задаче