1
0
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:
Paweł Gronowski
2025-12-12 11:17:42 +01:00
parent 67f5e3413b
commit 150a25b9ff

View File

@@ -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 {