mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-06 08:55:44 +00:00
* 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 <jhonce@redhat.com>
10 lines
265 B
Go
10 lines
265 B
Go
package parse
|
|
|
|
import "regexp"
|
|
|
|
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 {
|
|
return jsonFormatRegex.Match([]byte(s))
|
|
}
|