diff --git a/command/formatter/volume.go b/command/formatter/volume.go index 7bc3537573..695885b2fa 100644 --- a/command/formatter/volume.go +++ b/command/formatter/volume.go @@ -12,6 +12,7 @@ const ( defaultVolumeQuietFormat = "{{.Name}}" defaultVolumeTableFormat = "table {{.Driver}}\t{{.Name}}" + volumeNameHeader = "VOLUME NAME" mountpointHeader = "MOUNTPOINT" linksHeader = "LINKS" // Status header ? @@ -53,7 +54,7 @@ type volumeContext struct { } func (c *volumeContext) Name() string { - c.AddHeader(nameHeader) + c.AddHeader(volumeNameHeader) return c.v.Name } diff --git a/command/formatter/volume_test.go b/command/formatter/volume_test.go index 8c715b3438..8b92e8e164 100644 --- a/command/formatter/volume_test.go +++ b/command/formatter/volume_test.go @@ -22,7 +22,7 @@ func TestVolumeContext(t *testing.T) { }{ {volumeContext{ v: types.Volume{Name: volumeName}, - }, volumeName, nameHeader, ctx.Name}, + }, volumeName, volumeNameHeader, ctx.Name}, {volumeContext{ v: types.Volume{Driver: "driver_name"}, }, "driver_name", driverHeader, ctx.Driver}, @@ -76,7 +76,7 @@ func TestVolumeContextWrite(t *testing.T) { // Table format { Context{Format: NewVolumeFormat("table", false)}, - `DRIVER NAME + `DRIVER VOLUME NAME foo foobar_baz bar foobar_bar `, @@ -89,14 +89,14 @@ foobar_bar }, { Context{Format: NewVolumeFormat("table {{.Name}}", false)}, - `NAME + `VOLUME NAME foobar_baz foobar_bar `, }, { Context{Format: NewVolumeFormat("table {{.Name}}", true)}, - `NAME + `VOLUME NAME foobar_baz foobar_bar `,