mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 09:57:52 +00:00
Merge pull request #82928 from chendotjs/simplify-regex
simplify regexp with raw string
This commit is contained in:
@@ -36,7 +36,7 @@ import (
|
||||
utilprinters "k8s.io/kubectl/pkg/util/printers"
|
||||
)
|
||||
|
||||
var jsonRegexp = regexp.MustCompile("^\\{\\.?([^{}]+)\\}$|^\\.?([^{}]+)$")
|
||||
var jsonRegexp = regexp.MustCompile(`^\{\.?([^{}]+)\}$|^\.?([^{}]+)$`)
|
||||
|
||||
// RelaxedJSONPathExpression attempts to be flexible with JSONPath expressions, it accepts:
|
||||
// * metadata.name (no leading '.' or curly braces '{...}'
|
||||
|
Reference in New Issue
Block a user