summaryrefslogtreecommitdiff
path: root/cmd/podman/parse
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/parse')
-rw-r--r--cmd/podman/parse/json.go2
-rw-r--r--cmd/podman/parse/json_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/parse/json.go b/cmd/podman/parse/json.go
index 40ac415db..d7486d0b1 100644
--- a/cmd/podman/parse/json.go
+++ b/cmd/podman/parse/json.go
@@ -2,7 +2,7 @@ package parse
import "regexp"
-var jsonFormatRegex = regexp.MustCompile(`^\s*(json|{{\s*json\s*( \.)?\s*}})\s*$`)
+var jsonFormatRegex = regexp.MustCompile(`^\s*(json|{{\s*json\s*(\.)?\s*}})\s*$`)
// MatchesJSONFormat test CLI --format string to be a JSON request
func MatchesJSONFormat(s string) bool {
diff --git a/cmd/podman/parse/json_test.go b/cmd/podman/parse/json_test.go
index ec3b5664b..b3b29c93c 100644
--- a/cmd/podman/parse/json_test.go
+++ b/cmd/podman/parse/json_test.go
@@ -27,7 +27,7 @@ func TestMatchesJSONFormat(t *testing.T) {
{"json . }}", false},
{"{{.ID }} json .", false},
{"json .", false},
- {"{{json.}}", false},
+ {"{{json.}}", true},
}
for _, tt := range tests {