mirror of
https://github.com/containers/podman.git
synced 2025-12-08 06:39:05 +08:00
vendor buildah, image, storage, cni
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
821
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
821
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
File diff suppressed because it is too large
Load Diff
25
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
25
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
@@ -111,28 +111,3 @@ func TempDirForURL(dir, prefix, url string) (name string, subdir string, err err
|
||||
func InitReexec() bool {
|
||||
return buildah.InitReexec()
|
||||
}
|
||||
|
||||
// ReposToMap parses the specified repotags and returns a map with repositories
|
||||
// as keys and the corresponding arrays of tags as values.
|
||||
func ReposToMap(repotags []string) map[string][]string {
|
||||
// map format is repo -> tag
|
||||
repos := make(map[string][]string)
|
||||
for _, repo := range repotags {
|
||||
var repository, tag string
|
||||
if strings.Contains(repo, ":") {
|
||||
li := strings.LastIndex(repo, ":")
|
||||
repository = repo[0:li]
|
||||
tag = repo[li+1:]
|
||||
} else if len(repo) > 0 {
|
||||
repository = repo
|
||||
tag = "<none>"
|
||||
} else {
|
||||
logrus.Warnf("Found image with empty name")
|
||||
}
|
||||
repos[repository] = append(repos[repository], tag)
|
||||
}
|
||||
if len(repos) == 0 {
|
||||
repos["<none>"] = []string{"<none>"}
|
||||
}
|
||||
return repos
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user