diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-17 09:36:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 09:36:49 -0400 |
commit | d8414add00da27098267b8bd400cb5b045e8be96 (patch) | |
tree | b71894a84b49d6ffcdbf0358d644bbe9f92a395b /libpod/image | |
parent | 98aa458c7a13c72fabe02cd0ed2919c2801ef207 (diff) | |
parent | ecae5f7adeb1acea9c090c3d6c43f7470f33ac84 (diff) | |
download | podman-d8414add00da27098267b8bd400cb5b045e8be96.tar.gz podman-d8414add00da27098267b8bd400cb5b045e8be96.tar.bz2 podman-d8414add00da27098267b8bd400cb5b045e8be96.zip |
Merge pull request #7654 from vrothberg/fix-7651
image list: return all associated names
Diffstat (limited to 'libpod/image')
-rw-r--r-- | libpod/image/utils.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/libpod/image/utils.go b/libpod/image/utils.go index b7ea63c66..918314476 100644 --- a/libpod/image/utils.go +++ b/libpod/image/utils.go @@ -86,33 +86,6 @@ func hasTransport(image string) bool { return strings.Contains(image, "://") } -// ReposToMap parses the specified repotags and returns a map with repositories -// as keys and the corresponding arrays of tags or digests-as-strings as values. -func ReposToMap(names []string) (map[string][]string, error) { - // map format is repo -> []tag-or-digest - repos := make(map[string][]string) - for _, name := range names { - var repository, tag string - if len(name) > 0 { - named, err := reference.ParseNormalizedNamed(name) - if err != nil { - return nil, err - } - repository = named.Name() - if ref, ok := named.(reference.NamedTagged); ok { - tag = ref.Tag() - } else if ref, ok := named.(reference.Canonical); ok { - tag = ref.Digest().String() - } - } - repos[repository] = append(repos[repository], tag) - } - if len(repos) == 0 { - repos["<none>"] = []string{"<none>"} - } - return repos, nil -} - // GetAdditionalTags returns a list of reference.NamedTagged for the // additional tags given in images func GetAdditionalTags(images []string) ([]reference.NamedTagged, error) { |