summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes/inspect.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-04-17 13:20:36 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-17 18:57:40 -0500
commitc2a1138aecc2a0b3f60e3a61c0dfe18de3a47684 (patch)
tree8afc034f91192853d9461e83567a583e351d32ea /cmd/podman/volumes/inspect.go
parentbd8a0b08cdea5f15d6033b24038ba71aef1f8962 (diff)
downloadpodman-c2a1138aecc2a0b3f60e3a61c0dfe18de3a47684.tar.gz
podman-c2a1138aecc2a0b3f60e3a61c0dfe18de3a47684.tar.bz2
podman-c2a1138aecc2a0b3f60e3a61c0dfe18de3a47684.zip
enable integration testing
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/volumes/inspect.go')
-rw-r--r--cmd/podman/volumes/inspect.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/volumes/inspect.go b/cmd/podman/volumes/inspect.go
index 57e773aef..feaaee176 100644
--- a/cmd/podman/volumes/inspect.go
+++ b/cmd/podman/volumes/inspect.go
@@ -5,6 +5,7 @@ import (
"fmt"
"html/template"
"os"
+ "strings"
"github.com/containers/buildah/pkg/formats"
"github.com/containers/libpod/cmd/podman/registry"
@@ -61,7 +62,11 @@ func inspect(cmd *cobra.Command, args []string) error {
}
fmt.Println(string(jsonOut))
default:
- tmpl, err := template.New("volumeInspect").Parse(inspectFormat)
+ if !strings.HasSuffix(inspectFormat, "\n") {
+ inspectFormat += "\n"
+ }
+ format := "{{range . }}" + inspectFormat + "{{end}}"
+ tmpl, err := template.New("volumeInspect").Parse(format)
if err != nil {
return err
}