mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Fix linter list and fix errors discovered by new staticcheck
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user