list/tree: Add spacing before the content and first image

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit a9b78da546)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-08-16 13:48:49 +02:00
parent b719b10257
commit f42fa0b8e1
No known key found for this signature in database
GPG Key ID: B85EFCFE26DEF92A
1 changed files with 3 additions and 5 deletions

View File

@ -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 {
for _, img := range images {
_, _ = fmt.Fprintln(out, "")
}
printNames(out, columns, img, topNameColor)
printDetails(out, columns, normalColor, img.Details)
printChildren(out, columns, img, normalColor)