mirror of
https://github.com/containers/podman.git
synced 2025-09-22 12:14:26 +08:00
Update vendor containers/(common, buildah, image, storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
10
vendor/github.com/containers/common/libimage/normalize.go
generated
vendored
10
vendor/github.com/containers/common/libimage/normalize.go
generated
vendored
@ -100,22 +100,22 @@ func ToNameTagPairs(repoTags []reference.Named) ([]NameTagPair, error) {
|
||||
// normalizeTaggedDigestedString strips the tag off the specified string iff it
|
||||
// is tagged and digested. Note that the tag is entirely ignored to match
|
||||
// Docker behavior.
|
||||
func normalizeTaggedDigestedString(s string) (string, error) {
|
||||
func normalizeTaggedDigestedString(s string) (string, reference.Named, error) {
|
||||
// Note that the input string is not expected to be parseable, so we
|
||||
// return it verbatim in error cases.
|
||||
ref, err := reference.Parse(s)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return "", nil, err
|
||||
}
|
||||
named, ok := ref.(reference.Named)
|
||||
if !ok {
|
||||
return s, nil
|
||||
return s, nil, nil
|
||||
}
|
||||
named, err = normalizeTaggedDigestedNamed(named)
|
||||
if err != nil {
|
||||
return "", err
|
||||
return "", nil, err
|
||||
}
|
||||
return named.String(), nil
|
||||
return named.String(), named, nil
|
||||
}
|
||||
|
||||
// normalizeTaggedDigestedNamed strips the tag off the specified named
|
||||
|
Reference in New Issue
Block a user