Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>
  • Loading branch information
wangxiaoxuan273 committed Sep 6, 2024
1 parent dfd5af7 commit 39fefb0
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 39fefb0

Please sign in to comment.