From eb4a746efcb9e76e29942461b97da797fd67109f Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 9 Oct 2020 09:13:22 -0700 Subject: Restore --format table support * system df * events * fix error handling from go routine * update tests to use gomega matchers for better error messages * system info * version * volume inspect Signed-off-by: Jhon Honce --- cmd/podman/parse/json.go | 2 +- cmd/podman/parse/json_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/podman/parse') 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 { -- cgit v1.2.3-54-g00ecf