mirror of
https://github.com/containers/skopeo.git
synced 2025-06-28 23:57:51 +00:00
Remove a redundant check
reference.WithDefaultTag is already calling reference.IsNameOnly, so we don't need to guard it on the outside.
This commit is contained in:
parent
521e3ce0eb
commit
09f33a7c2c
@ -8,9 +8,7 @@ func parseDockerImageName(img string) (reference.Named, string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
if reference.IsNameOnly(ref) {
|
|
||||||
ref = reference.WithDefaultTag(ref)
|
ref = reference.WithDefaultTag(ref)
|
||||||
}
|
|
||||||
var tag string
|
var tag string
|
||||||
switch x := ref.(type) {
|
switch x := ref.(type) {
|
||||||
case reference.Canonical:
|
case reference.Canonical:
|
||||||
|
Loading…
Reference in New Issue
Block a user