From 150a25b9ff45798ab6f23a365d6d8979faa670c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 12 Dec 2025 11:17:42 +0100 Subject: [PATCH] image/tree: Extract untagged image name to const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- cli/command/image/tree.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index ff0c54a4cc..2a497e6e77 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -22,6 +22,8 @@ import ( "github.com/opencontainers/go-digest" ) +const untaggedName = "" + 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, "")) + _, _ = fmt.Fprint(out, headers[0].Print(untaggedColor, untaggedName)) } for nameIdx, name := range img.Names {