Fix jsonpath slice step handling

Kubernetes-commit: 233d7e4962f61e9e8b4a4695f0cdab688ffc4368
This commit is contained in:
Jordan Liggitt
2019-01-21 16:58:52 -05:00
committed by Kubernetes Publisher
parent e3fddcc5ac
commit 6b7e2becf2
4 changed files with 145 additions and 9 deletions

View File

@@ -46,7 +46,7 @@ type Parser struct {
var (
ErrSyntax = errors.New("invalid syntax")
dictKeyRex = regexp.MustCompile(`^'([^']*)'$`)
sliceOperatorRex = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`)
sliceOperatorRex = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:-?[\d]*)?$`)
)
// Parse parsed the given text and return a node Parser.