update vendor

This commit is contained in:
Ettore Di Giacinto
2021-10-23 20:47:32 +02:00
parent 6a9f19941a
commit ab251fefce
889 changed files with 80636 additions and 20210 deletions

View File

@@ -17,8 +17,7 @@ package crane
import (
"fmt"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/internal/legacy"
"github.com/google/go-containerregistry/internal/legacy"
"github.com/google/go-containerregistry/pkg/logs"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote"
@@ -59,7 +58,7 @@ func Copy(src, dst string, opt ...Option) error {
}
case types.DockerManifestSchema1, types.DockerManifestSchema1Signed:
// Handle schema 1 images separately.
if err := copySchema1(desc, srcRef, dstRef); err != nil {
if err := legacy.CopySchema1(desc, srcRef, dstRef, o.remote...); err != nil {
return fmt.Errorf("failed to copy schema 1 image: %v", err)
}
default:
@@ -87,16 +86,3 @@ func copyIndex(desc *remote.Descriptor, dstRef name.Reference, o options) error
}
return remote.WriteIndex(dstRef, idx, o.remote...)
}
func copySchema1(desc *remote.Descriptor, srcRef, dstRef name.Reference) error {
srcAuth, err := authn.DefaultKeychain.Resolve(srcRef.Context().Registry)
if err != nil {
return err
}
dstAuth, err := authn.DefaultKeychain.Resolve(dstRef.Context().Registry)
if err != nil {
return err
}
return legacy.CopySchema1(desc, srcRef, dstRef, srcAuth, dstAuth)
}