Fix linter list and fix errors discovered by new staticcheck

This commit is contained in:
Andrey Smirnov
2019-01-20 00:01:17 +03:00
parent a64807efda
commit 3b5840e248
8 changed files with 9 additions and 23 deletions

View File

@@ -81,7 +81,7 @@ func (downloader *downloaderImpl) GetLength(ctx context.Context, url string) (in
}
if resp.ContentLength < 0 {
return -1, fmt.Errorf("Could not determine length of %s", url)
return -1, fmt.Errorf("could not determine length of %s", url)
}
return resp.ContentLength, nil
@@ -94,12 +94,12 @@ func (downloader *downloaderImpl) Download(ctx context.Context, url string, dest
func retryableError(err error) bool {
switch err.(type) {
case net.Error:
return true
case *net.OpError:
return true
case syscall.Errno:
return true
case net.Error:
return true
}
return false
}