Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Feb 17, 2024
1 parent 9d74288 commit 4a504cd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/crane/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ func getImage(r string, opt ...Option) (v1.Image, name.Reference, error) {
return img, ref, nil
}

// func getManifest(r string, opt ...Option) (*remote.Descriptor, error) {
// o := makeOptions(opt...)
// ref, err := name.ParseReference(r, o.Name...)
// if err != nil {
// return nil, fmt.Errorf("parsing reference %q: %w", r, err)
// }
// return remote.Get(ref, o.Remote...)
// }
func getManifest(r string, opt ...Option) (*remote.Descriptor, error) {
o := makeOptions(opt...)
ref, err := name.ParseReference(r, o.Name...)
if err != nil {
return nil, fmt.Errorf("parsing reference %q: %w", r, err)
}
return remote.Get(ref, o.Remote...)
}

// Get calls remote.Get and returns an uninterpreted response.
// func Get(r string, opt ...Option) (*remote.Descriptor, error) {
// return getManifest(r, opt...)
// }
func Get(r string, opt ...Option) (*remote.Descriptor, error) {
return getManifest(r, opt...)
}

func getArtifact(r string, opt ...Option) (partial.Artifact, error) {
o := makeOptions(opt...)
Expand Down

0 comments on commit 4a504cd

Please sign in to comment.