diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-10-28 11:03:09 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-10-29 10:14:08 -0700 |
commit | d60a0ddcc1784b2dd807cc8e4d4f3deb0c074171 (patch) | |
tree | b1ec22f25a3239f41f3e7e42159091d3d135aa20 /cmd/podman/volumes | |
parent | e439aec4fa867cda0672079dac0fe394dfb3306c (diff) | |
download | podman-d60a0ddcc1784b2dd807cc8e4d4f3deb0c074171.tar.gz podman-d60a0ddcc1784b2dd807cc8e4d4f3deb0c074171.tar.bz2 podman-d60a0ddcc1784b2dd807cc8e4d4f3deb0c074171.zip |
Restore --format table header support
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman/volumes')
-rw-r--r-- | cmd/podman/volumes/list.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/volumes/list.go b/cmd/podman/volumes/list.go index b3b2b8ea1..ce0b7997d 100644 --- a/cmd/podman/volumes/list.go +++ b/cmd/podman/volumes/list.go @@ -9,6 +9,7 @@ import ( "text/template" "github.com/containers/common/pkg/report" + "github.com/containers/podman/v2/cmd/podman/parse" "github.com/containers/podman/v2/cmd/podman/registry" "github.com/containers/podman/v2/cmd/podman/validate" "github.com/containers/podman/v2/pkg/domain/entities" @@ -91,9 +92,9 @@ func outputTemplate(cmd *cobra.Command, responses []*entities.VolumeListReport) if cliOpts.Quiet { row = "{{.Name}}\n" } - row = "{{range . }}" + row + "{{end}}" + format := parse.EnforceRange(row) - tmpl, err := template.New("list volume").Parse(row) + tmpl, err := template.New("list volume").Parse(format) if err != nil { return err } |