Skip to content

Commit a9b78da

Browse files
committed
list/tree: Add spacing before the content and first image
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1 parent 0242a1e commit a9b78da

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

cli/command/image/tree.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error {
132132
}
133133

134134
_, _ = fmt.Fprintln(out, warningColor.Apply("WARNING: This is an experimental feature. The output may change and shouldn't be depended on."))
135+
_, _ = fmt.Fprintln(out, "")
135136

136137
columns := []imgColumn{
137138
{
@@ -213,11 +214,8 @@ func printImageTree(dockerCLI command.Cli, images []topImage) error {
213214
_, _ = fmt.Fprintln(out)
214215

215216
// Print images
216-
for idx, img := range images {
217-
if idx != 0 {
218-
_, _ = fmt.Fprintln(out, "")
219-
}
220-
217+
for _, img := range images {
218+
_, _ = fmt.Fprintln(out, "")
221219
printNames(out, columns, img, topNameColor)
222220
printDetails(out, columns, normalColor, img.Details)
223221
printChildren(out, columns, img, normalColor)

0 commit comments

Comments
 (0)