mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
use utils.ParseRepositoryTag instead of strings.split in docker images
This commit is contained in:
parent
4c7d24bc8b
commit
84a3600ea8
1 changed files with 2 additions and 6 deletions
|
@ -1172,14 +1172,10 @@ func (cli *DockerCli) CmdImages(args ...string) error {
|
|||
fmt.Fprintln(w, "REPOSITORY\tTAG\tIMAGE ID\tCREATED\tSIZE")
|
||||
}
|
||||
|
||||
var repo string
|
||||
var tag string
|
||||
for _, out := range outs {
|
||||
for _, repotag := range out.RepoTags {
|
||||
|
||||
components := strings.SplitN(repotag, ":", 2)
|
||||
repo = components[0]
|
||||
tag = components[1]
|
||||
repo, tag := utils.ParseRepositoryTag(repotag)
|
||||
|
||||
if !*noTrunc {
|
||||
out.ID = utils.TruncateID(out.ID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue