diff options
author | Miloslav Trmač <mitr@redhat.com> | 2019-01-14 03:58:35 +0100 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2019-01-14 04:06:58 +0100 |
commit | 6486e2c41be0aa50bd5b70d859a23f36070d0ae1 (patch) | |
tree | 83ac8e405d7aed2efe966815cd7ac61befc769a6 /libpod/image/image.go | |
parent | a6e668fac54b8dcc34b9810738b22fa7c8561325 (diff) | |
download | podman-6486e2c41be0aa50bd5b70d859a23f36070d0ae1.tar.gz podman-6486e2c41be0aa50bd5b70d859a23f36070d0ae1.tar.bz2 podman-6486e2c41be0aa50bd5b70d859a23f36070d0ae1.zip |
Drop image.DecomposeString, make image.Parts private imageParts again
Now that DecomposeString has no users, make the type private again.
Any new users of it should come with a rationale - and new users
of the "none"/"latest" handling of untagged/digested names that is
currently implemented should have an exceptionaly unusual rationale.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index dda753385..b51aced49 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -25,7 +25,7 @@ import ( "github.com/containers/libpod/pkg/util" "github.com/containers/storage" "github.com/containers/storage/pkg/reexec" - "github.com/opencontainers/go-digest" + digest "github.com/opencontainers/go-digest" ociv1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -460,7 +460,7 @@ func normalizeTag(tag string) (string, error) { } // 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) + tag = fmt.Sprintf("%s:%s", tag, decomposedTag.tag) } // If the input doesn't specify a registry, set the registry to localhost if !decomposedTag.hasRegistry { @@ -937,7 +937,7 @@ func (i *Image) MatchRepoTag(input string) (string, error) { if err != nil { return "", err } - if dcRepoName.Registry == dcImage.Registry && dcImage.Registry != "" { + if dcRepoName.registry == dcImage.registry && dcImage.registry != "" { count++ } if dcRepoName.name == dcImage.name && dcImage.name != "" { @@ -945,7 +945,7 @@ func (i *Image) MatchRepoTag(input string) (string, error) { } else if splitString(dcRepoName.name) == splitString(dcImage.name) { count++ } - if dcRepoName.Tag == dcImage.Tag { + if dcRepoName.tag == dcImage.tag { count++ } results[count] = append(results[count], repoName) |