From 1e678b70e3daba4bba32573fc0bf00009fe1a639 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Thu, 5 May 2016 10:58:14 -0700 Subject: [PATCH] change size label depending on size type --- images.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/images.go b/images.go index cab7c15..9343ea1 100644 --- a/images.go +++ b/images.go @@ -353,13 +353,16 @@ func PrintTreeNode(buffer *bytes.Buffer, image Image, noTrunc bool, incremental } var size int64 + var sizeLabel string if incremental { + sizeLabel = "Size" size = image.Size } else { + sizeLabel = "Virtual Size" size = image.VirtualSize } - buffer.WriteString(fmt.Sprintf("%s%s Virtual Size: %s", prefix, imageID, humanSize(size))) + buffer.WriteString(fmt.Sprintf("%s%s %s: %s", prefix, imageID, sizeLabel, humanSize(size))) if image.RepoTags[0] != ":" { buffer.WriteString(fmt.Sprintf(" Tags: %s\n", strings.Join(image.RepoTags, ", "))) } else {