change size label depending on size type
This commit is contained in:
parent
7ea47fc9cf
commit
1e678b70e3
1 changed files with 4 additions and 1 deletions
|
@ -353,13 +353,16 @@ func PrintTreeNode(buffer *bytes.Buffer, image Image, noTrunc bool, incremental
|
||||||
}
|
}
|
||||||
|
|
||||||
var size int64
|
var size int64
|
||||||
|
var sizeLabel string
|
||||||
if incremental {
|
if incremental {
|
||||||
|
sizeLabel = "Size"
|
||||||
size = image.Size
|
size = image.Size
|
||||||
} else {
|
} else {
|
||||||
|
sizeLabel = "Virtual Size"
|
||||||
size = image.VirtualSize
|
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] != "<none>:<none>" {
|
if image.RepoTags[0] != "<none>:<none>" {
|
||||||
buffer.WriteString(fmt.Sprintf(" Tags: %s\n", strings.Join(image.RepoTags, ", ")))
|
buffer.WriteString(fmt.Sprintf(" Tags: %s\n", strings.Join(image.RepoTags, ", ")))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue