summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-10-28 11:03:09 -0700
committerJhon Honce <jhonce@redhat.com>2020-10-29 10:14:08 -0700
commitd60a0ddcc1784b2dd807cc8e4d4f3deb0c074171 (patch)
treeb1ec22f25a3239f41f3e7e42159091d3d135aa20 /cmd/podman/volumes
parente439aec4fa867cda0672079dac0fe394dfb3306c (diff)
downloadpodman-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.go5
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
}