Merge pull request #6676 from lsm5/tag-correction

Account for non-default port number in image name
This commit is contained in:
OpenShift Merge Robot
2020-06-20 05:51:57 -04:00
committed by GitHub

View File

@ -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>", ""
} }