diff options
author | Miloslav Trmač <mitr@redhat.com> | 2019-01-09 21:18:53 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2019-01-14 04:07:23 +0100 |
commit | e58aa74766c14844700330e11e8f0b48843884be (patch) | |
tree | f7c50aab51bfe7b1670bc8057eb374405a7f3d0b | |
parent | e5c764ec3cc11982cdb8e127554e4ac61ce9a854 (diff) | |
download | podman-e58aa74766c14844700330e11e8f0b48843884be.tar.gz podman-e58aa74766c14844700330e11e8f0b48843884be.tar.bz2 podman-e58aa74766c14844700330e11e8f0b48843884be.zip |
Use imageparts.referenceWithRegistry in normalizeTag
... instead of open-coding something similar. Eventually
we will use the reference type further in here.
Should not change behavior.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r-- | libpod/image/image.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 249beceac..3d8cf2651 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -460,7 +460,11 @@ func normalizeTag(tag string) (string, error) { } // If the input doesn't specify a registry, set the registry to localhost if !decomposedTag.hasRegistry { - tag = fmt.Sprintf("%s/%s", DefaultLocalRegistry, tag) + ref, err := decomposedTag.referenceWithRegistry(DefaultLocalRegistry) + if err != nil { + return "", err + } + tag = ref.String() } // If the input does not have a tag, we need to add one (latest) if !decomposedTag.isTagged { |