summaryrefslogtreecommitdiff
path: root/libpod/image/utils.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-14 03:58:35 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 04:06:58 +0100
commit6486e2c41be0aa50bd5b70d859a23f36070d0ae1 (patch)
tree83ac8e405d7aed2efe966815cd7ac61befc769a6 /libpod/image/utils.go
parenta6e668fac54b8dcc34b9810738b22fa7c8561325 (diff)
downloadpodman-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/utils.go')
-rw-r--r--libpod/image/utils.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/image/utils.go b/libpod/image/utils.go
index 135b47008..b944de1bb 100644
--- a/libpod/image/utils.go
+++ b/libpod/image/utils.go
@@ -16,7 +16,7 @@ import (
// findImageInRepotags takes an imageParts struct and searches images' repotags for
// a match on name:tag
-func findImageInRepotags(search Parts, images []*Image) (*storage.Image, error) {
+func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, error) {
var results []*storage.Image
for _, image := range images {
for _, name := range image.Names() {
@@ -25,12 +25,12 @@ func findImageInRepotags(search Parts, images []*Image) (*storage.Image, error)
if err != nil {
continue
}
- if d.name == search.name && d.Tag == search.Tag {
+ if d.name == search.name && d.tag == search.tag {
results = append(results, image.image)
continue
}
// account for registry:/somedir/image
- if strings.HasSuffix(d.name, search.name) && d.Tag == search.Tag {
+ if strings.HasSuffix(d.name, search.name) && d.tag == search.tag {
results = append(results, image.image)
continue
}