diff --git a/internal/contentutil/reference.go b/internal/contentutil/reference.go index 530557150..4a374b234 100644 --- a/internal/contentutil/reference.go +++ b/internal/contentutil/reference.go @@ -15,18 +15,10 @@ limitations under the License. package contentutil -import ( - "github.com/opencontainers/go-digest" - "oras.land/oras-go/v2/registry" -) +import "github.com/opencontainers/go-digest" // IsDigest checks if the given string is a valid digest. func IsDigest(tagOrDigest string) bool { _, err := digest.Parse(tagOrDigest) return err == nil } - -// IsValidTag checks if the given string is a valid tag. -func IsValidTag(tag string) bool { - return registry.Reference{Reference: tag}.ValidateReferenceAsTag() == nil -} diff --git a/internal/descriptor/descriptor.go b/internal/descriptor/descriptor.go index 46399dd3c..41f7321b7 100644 --- a/internal/descriptor/descriptor.go +++ b/internal/descriptor/descriptor.go @@ -22,10 +22,7 @@ import ( ) // IsManifest checks if a descriptor describes a manifest. -<<<<<<< HEAD // Adapted from `oras-go`: https://github.com/oras-project/oras-go/blob/d6c837e439f4c567f8003eab6e423c22900452a8/internal/descriptor/descriptor.go#L67 -======= ->>>>>>> 704e455 (rebase) func IsManifest(desc ocispec.Descriptor) bool { switch desc.MediaType { case docker.MediaTypeManifest,