From 035c732dedf37637b9ac5e37748ec1b0bea3c966 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Wed, 9 Jan 2019 19:49:53 +0100 Subject: Reorganize normalizeTag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the registry defaulting before tag defaulting. Should not change behavior. Signed-off-by: Miloslav Trmač --- libpod/image/image.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpod/image') diff --git a/libpod/image/image.go b/libpod/image/image.go index b51aced49..249beceac 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -458,14 +458,14 @@ func normalizeTag(tag string) (string, error) { if err != nil { return "", err } - // If the input does not have a tag, we need to add one (latest) - if !decomposedTag.isTagged { - tag = fmt.Sprintf("%s:%s", tag, decomposedTag.tag) - } // If the input doesn't specify a registry, set the registry to localhost if !decomposedTag.hasRegistry { tag = fmt.Sprintf("%s/%s", DefaultLocalRegistry, tag) } + // If the input does not have a tag, we need to add one (latest) + if !decomposedTag.isTagged { + tag = fmt.Sprintf("%s:%s", tag, decomposedTag.tag) + } return tag, nil } -- cgit v1.2.3-54-g00ecf