mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #6676 from lsm5/tag-correction
Account for non-default port number in image name
This commit is contained in:
@ -193,7 +193,7 @@ func sortImages(imageS []*entities.ImageSummary) []imageReporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func tokenRepoTag(tag string) (string, string) {
|
func tokenRepoTag(tag string) (string, string) {
|
||||||
tokens := strings.SplitN(tag, ":", 2)
|
tokens := strings.Split(tag, ":")
|
||||||
switch len(tokens) {
|
switch len(tokens) {
|
||||||
case 0:
|
case 0:
|
||||||
return tag, ""
|
return tag, ""
|
||||||
@ -201,6 +201,8 @@ func tokenRepoTag(tag string) (string, string) {
|
|||||||
return tokens[0], ""
|
return tokens[0], ""
|
||||||
case 2:
|
case 2:
|
||||||
return tokens[0], tokens[1]
|
return tokens[0], tokens[1]
|
||||||
|
case 3:
|
||||||
|
return tokens[0] + ":" + tokens[1], tokens[2]
|
||||||
default:
|
default:
|
||||||
return "<N/A>", ""
|
return "<N/A>", ""
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user