mirror of
https://github.com/docker/cli.git
synced 2026-01-26 15:41:42 +03:00
image/tree: Extract untagged image name to const
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -22,6 +22,8 @@ import (
|
||||
"github.com/opencontainers/go-digest"
|
||||
)
|
||||
|
||||
const untaggedName = "<untagged>"
|
||||
|
||||
type treeOptions struct {
|
||||
images []imagetypes.Summary
|
||||
all bool
|
||||
@@ -433,7 +435,7 @@ func printChildren(out tui.Output, headers []imgColumn, img topImage, normalColo
|
||||
|
||||
func printNames(out tui.Output, headers []imgColumn, img topImage, color, untaggedColor aec.ANSI) {
|
||||
if len(img.Names) == 0 {
|
||||
_, _ = fmt.Fprint(out, headers[0].Print(untaggedColor, "<untagged>"))
|
||||
_, _ = fmt.Fprint(out, headers[0].Print(untaggedColor, untaggedName))
|
||||
}
|
||||
|
||||
for nameIdx, name := range img.Names {
|
||||
|
||||
Reference in New Issue
Block a user