Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
Signed-off-by: wangxiaoxuan273 <[email protected]>
  • Loading branch information
wangxiaoxuan273 authored and Xiaoxuan Wang committed Sep 9, 2024
1 parent 9390804 commit 2aade5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
10 changes: 1 addition & 9 deletions internal/contentutil/reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 0 additions & 3 deletions internal/descriptor/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2aade5a

Please sign in to comment.