mirror of
https://github.com/distribution/distribution.git
synced 2025-09-14 14:19:02 +00:00
feat(linter): enable errcheck linter in golangci-lint
Also, bump the linter version to the latest available version. Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
@@ -319,7 +319,9 @@ func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) e
|
||||
copyStatus := *resp.CopyStatus
|
||||
|
||||
if d.copyStatusPollMaxRetry == -1 && copyStatus == blob.CopyStatusTypePending {
|
||||
destBlobRef.AbortCopyFromURL(ctx, *resp.CopyID, nil)
|
||||
if _, err := destBlobRef.AbortCopyFromURL(ctx, *resp.CopyID, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -331,7 +333,9 @@ func (d *driver) Move(ctx context.Context, sourcePath string, destPath string) e
|
||||
}
|
||||
|
||||
if retryCount >= d.copyStatusPollMaxRetry {
|
||||
destBlobRef.AbortCopyFromURL(ctx, *props.CopyID, nil)
|
||||
if _, err := destBlobRef.AbortCopyFromURL(ctx, *props.CopyID, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
return fmt.Errorf("max retries for copy polling reached, aborting copy")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user