diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-18 05:58:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 05:58:21 -0400 |
commit | 3b461ed6eb85f329ad163a4f18df3b872fe86f04 (patch) | |
tree | dbce70630d71af5da73f1491ba05104f32c68865 /cmd/podman/volumes/inspect.go | |
parent | aa97cb5f42a35de02d520f6c3006600505a3d6d9 (diff) | |
parent | c2a1138aecc2a0b3f60e3a61c0dfe18de3a47684 (diff) | |
download | podman-3b461ed6eb85f329ad163a4f18df3b872fe86f04.tar.gz podman-3b461ed6eb85f329ad163a4f18df3b872fe86f04.tar.bz2 podman-3b461ed6eb85f329ad163a4f18df3b872fe86f04.zip |
Merge pull request #5871 from baude/v2t3
enable integration testing
Diffstat (limited to 'cmd/podman/volumes/inspect.go')
-rw-r--r-- | cmd/podman/volumes/inspect.go | 7 |
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 } |