From a9b78da546ccfa90b420356eda4b70074881281d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 16 Aug 2024 13:48:49 +0200 Subject: [PATCH] list/tree: Add spacing before the content and first image 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index 0c114641aa..a034ca5260 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -132,6 +132,7 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error { } _, _ = fmt.Fprintln(out, warningColor.Apply("WARNING: This is an experimental feature. The output may change and shouldn't be depended on.")) + _, _ = fmt.Fprintln(out, "") columns := []imgColumn{ { @@ -213,11 +214,8 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error { _, _ = fmt.Fprintln(out) // Print images - for idx, img := range images { - if idx != 0 { - _, _ = fmt.Fprintln(out, "") - } - + for _, img := range images { + _, _ = fmt.Fprintln(out, "") printNames(out, columns, img, topNameColor) printDetails(out, columns, normalColor, img.Details) printChildren(out, columns, img, normalColor)