Update go dependencies and cleanup deprecated packages
This commit is contained in:
parent
03a1e20fde
commit
44fd79d061
1099 changed files with 75691 additions and 31913 deletions
2
vendor/k8s.io/client-go/util/jsonpath/BUILD
generated
vendored
2
vendor/k8s.io/client-go/util/jsonpath/BUILD
generated
vendored
|
|
@ -12,6 +12,7 @@ go_test(
|
|||
"jsonpath_test.go",
|
||||
"parser_test.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/util/jsonpath",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
|
|
@ -23,6 +24,7 @@ go_library(
|
|||
"node.go",
|
||||
"parser.go",
|
||||
],
|
||||
importpath = "k8s.io/client-go/util/jsonpath",
|
||||
deps = ["//vendor/k8s.io/client-go/third_party/forked/golang/template:go_default_library"],
|
||||
)
|
||||
|
||||
|
|
|
|||
12
vendor/k8s.io/client-go/util/jsonpath/parser.go
generated
vendored
12
vendor/k8s.io/client-go/util/jsonpath/parser.go
generated
vendored
|
|
@ -43,7 +43,11 @@ type Parser struct {
|
|||
width int
|
||||
}
|
||||
|
||||
var ErrSyntax = errors.New("invalid syntax")
|
||||
var (
|
||||
ErrSyntax = errors.New("invalid syntax")
|
||||
dictKeyRex = regexp.MustCompile(`^'([^']*)'$`)
|
||||
sliceOperatorRex = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`)
|
||||
)
|
||||
|
||||
// Parse parsed the given text and return a node Parser.
|
||||
// If an error is encountered, parsing stops and an empty
|
||||
|
|
@ -283,8 +287,7 @@ Loop:
|
|||
}
|
||||
|
||||
// dict key
|
||||
reg := regexp.MustCompile(`^'([^']*)'$`)
|
||||
value := reg.FindStringSubmatch(text)
|
||||
value := dictKeyRex.FindStringSubmatch(text)
|
||||
if value != nil {
|
||||
parser, err := parseAction("arraydict", fmt.Sprintf(".%s", value[1]))
|
||||
if err != nil {
|
||||
|
|
@ -297,8 +300,7 @@ Loop:
|
|||
}
|
||||
|
||||
//slice operator
|
||||
reg = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`)
|
||||
value = reg.FindStringSubmatch(text)
|
||||
value = sliceOperatorRex.FindStringSubmatch(text)
|
||||
if value == nil {
|
||||
return fmt.Errorf("invalid array index %s", text)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue