|
@@ -1137,7 +1137,7 @@ func GetSHA256Digest(r io.Reader) (string, int64) {
|
|
return fmt.Sprintf("sha256:%x", h.Sum(nil)), n
|
|
return fmt.Sprintf("sha256:%x", h.Sum(nil)), n
|
|
}
|
|
}
|
|
|
|
|
|
-var errUnauthorized = fmt.Errorf("unauthorized")
|
|
|
|
|
|
+var errUnauthorized = errors.New("unauthorized")
|
|
|
|
|
|
func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.URL, headers http.Header, body io.ReadSeeker, regOpts *registryOptions) (*http.Response, error) {
|
|
func makeRequestWithRetry(ctx context.Context, method string, requestURL *url.URL, headers http.Header, body io.ReadSeeker, regOpts *registryOptions) (*http.Response, error) {
|
|
for i := 0; i < 2; i++ {
|
|
for i := 0; i < 2; i++ {
|
|
@@ -1255,7 +1255,7 @@ func parseRegistryChallenge(authStr string) registryChallenge {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-var errDigestMismatch = fmt.Errorf("digest mismatch, file must be downloaded again")
|
|
|
|
|
|
+var errDigestMismatch = errors.New("digest mismatch, file must be downloaded again")
|
|
|
|
|
|
func verifyBlob(digest string) error {
|
|
func verifyBlob(digest string) error {
|
|
fp, err := GetBlobsPath(digest)
|
|
fp, err := GetBlobsPath(digest)
|