Skip to content

Commit 352ee0a

Browse files
cpuguy83thaJeztah
authored andcommitted
Images Tree: Change 'Used' to 'In Use'
Signed-off-by: Brian Goff <cpuguy83@gmail.com> (cherry picked from commit df52ddc) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent d0cb93a commit 352ee0a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cli/command/image/tree.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error
4646
details := imageDetails{
4747
ID: img.ID,
4848
DiskUsage: units.HumanSizeWithPrecision(float64(img.Size), 3),
49-
Used: img.Containers > 0,
49+
InUse: img.Containers > 0,
5050
}
5151

5252
var totalContent int64
@@ -63,14 +63,14 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error
6363
Details: imageDetails{
6464
ID: im.ID,
6565
DiskUsage: units.HumanSizeWithPrecision(float64(im.Size.Total), 3),
66-
Used: len(im.ImageData.Containers) > 0,
66+
InUse: len(im.ImageData.Containers) > 0,
6767
ContentSize: units.HumanSizeWithPrecision(float64(im.Size.Content), 3),
6868
},
6969
}
7070

71-
if sub.Details.Used {
71+
if sub.Details.InUse {
7272
// Mark top-level parent image as used if any of its subimages are used.
73-
details.Used = true
73+
details.InUse = true
7474
}
7575

7676
totalContent += im.Size.Content
@@ -100,7 +100,7 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) error
100100
type imageDetails struct {
101101
ID string
102102
DiskUsage string
103-
Used bool
103+
InUse bool
104104
ContentSize string
105105
}
106106

@@ -179,12 +179,12 @@ func printImageTree(dockerCLI command.Cli, view treeView) error {
179179
},
180180
},
181181
{
182-
Title: "Used",
182+
Title: "In Use",
183183
Align: alignCenter,
184-
Width: 4,
184+
Width: 6,
185185
Color: &greenColor,
186186
DetailsValue: func(d *imageDetails) string {
187-
if d.Used {
187+
if d.InUse {
188188
return "✔"
189189
}
190190
return " "

0 commit comments

Comments
 (0)