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:
Miloslav Trmač 2016-05-21 04:48:33 +02:00
parent 521e3ce0eb
commit 09f33a7c2c

View File

@ -8,9 +8,7 @@ func parseDockerImageName(img string) (reference.Named, string, error) {
if err != nil {
return nil, "", err
}
if reference.IsNameOnly(ref) {
ref = reference.WithDefaultTag(ref)
}
ref = reference.WithDefaultTag(ref)
var tag string
switch x := ref.(type) {
case reference.Canonical: