diff options
author | Jimmy Crumpler <slimjim2234@gmail.com> | 2019-10-31 22:36:31 -0400 |
---|---|---|
committer | Jimmy Crumpler <slimjim2234@gmail.com> | 2019-11-01 23:36:17 -0400 |
commit | cb2978d6e93b5ad19478386484ba57610d6cfa67 (patch) | |
tree | 3362aa04e3268f168c36805d6ebdaf8398884a42 /cmd/podman/info.go | |
parent | 381fa4df875af3d2acee34d4fc1a608b2218b551 (diff) | |
download | podman-cb2978d6e93b5ad19478386484ba57610d6cfa67.tar.gz podman-cb2978d6e93b5ad19478386484ba57610d6cfa67.tar.bz2 podman-cb2978d6e93b5ad19478386484ba57610d6cfa67.zip |
Fixed the JSON go template format for the 'info' action
Signed-off-by: Jimmy Crumpler <slimjim2234@gmail.com>
Diffstat (limited to 'cmd/podman/info.go')
-rw-r--r-- | cmd/podman/info.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/info.go b/cmd/podman/info.go index bf6dd4a8f..7361525ce 100644 --- a/cmd/podman/info.go +++ b/cmd/podman/info.go @@ -3,6 +3,7 @@ package main import ( "fmt" rt "runtime" + "strings" "github.com/containers/buildah/pkg/formats" "github.com/containers/libpod/cmd/podman/cliconfig" @@ -88,6 +89,9 @@ func infoCmd(c *cliconfig.InfoValues) error { var out formats.Writer infoOutputFormat := c.Format + if strings.Join(strings.Fields(infoOutputFormat), "") == "{{json.}}" { + infoOutputFormat = formats.JSONString + } switch infoOutputFormat { case formats.JSONString: out = formats.JSONStruct{Output: info} |