summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-18 15:51:31 -0700
committerGitHub <noreply@github.com>2019-03-18 15:51:31 -0700
commitac523cbe2b257e13c7b3b823c8de83e44052ffaf (patch)
tree979b7de44a7cc4736deb91a980c6fe5963fbca4b /cmd
parent8afe02fe96cc6e729ba2e279034650cd99068fae (diff)
parent6aa8d14745dd778211fcf2941ce8fe5b5a95d5d9 (diff)
downloadpodman-ac523cbe2b257e13c7b3b823c8de83e44052ffaf.tar.gz
podman-ac523cbe2b257e13c7b3b823c8de83e44052ffaf.tar.bz2
podman-ac523cbe2b257e13c7b3b823c8de83e44052ffaf.zip
Merge pull request #2688 from baude/issue2671
support GO template {{ json . }}
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/version.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/version.go b/cmd/podman/version.go
index 336be892e..31b0b8e82 100644
--- a/cmd/podman/version.go
+++ b/cmd/podman/version.go
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
+ "strings"
"text/tabwriter"
"time"
@@ -43,6 +44,9 @@ func versionCmd(c *cliconfig.VersionValues) error {
versionOutputFormat := c.Format
if versionOutputFormat != "" {
+ if strings.Join(strings.Fields(versionOutputFormat), "") == "{{json.}}" {
+ versionOutputFormat = formats.JSONString
+ }
var out formats.Writer
switch versionOutputFormat {
case formats.JSONString: