aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
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
}