reconcile merge

Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
Huamin Chen
2019-01-15 16:20:41 +00:00
parent 85b8415024
commit e46099a504
2425 changed files with 271763 additions and 40453 deletions

View File

@ -1,41 +0,0 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_test(
name = "go_default_test",
srcs = [
"jsonpath_test.go",
"parser_test.go",
],
embed = [":go_default_library"],
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"jsonpath.go",
"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"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View File

@ -80,7 +80,7 @@ func (l *ListNode) append(n Node) {
}
func (l *ListNode) String() string {
return fmt.Sprintf("%s", l.Type())
return l.Type().String()
}
// TextNode holds plain text.
@ -210,7 +210,7 @@ func newWildcard() *WildcardNode {
}
func (i *WildcardNode) String() string {
return fmt.Sprintf("%s", i.Type())
return i.Type().String()
}
// RecursiveNode means a recursive descent operator
@ -223,7 +223,7 @@ func newRecursive() *RecursiveNode {
}
func (r *RecursiveNode) String() string {
return fmt.Sprintf("%s", r.Type())
return r.Type().String()
}
// UnionNode is union of ListNode
@ -237,7 +237,7 @@ func newUnion(nodes []*ListNode) *UnionNode {
}
func (u *UnionNode) String() string {
return fmt.Sprintf("%s", u.Type())
return u.Type().String()
}
// BoolNode holds bool value

View File

@ -94,7 +94,7 @@ func (p *Parser) consumeText() string {
// next returns the next rune in the input.
func (p *Parser) next() rune {
if int(p.pos) >= len(p.input) {
if p.pos >= len(p.input) {
p.width = 0
return eof
}
@ -266,7 +266,7 @@ Loop:
}
}
text := p.consumeText()
text = string(text[1 : len(text)-1])
text = text[1 : len(text)-1]
if text == "*" {
text = ":"
}
@ -373,7 +373,7 @@ Loop:
}
reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`)
text := p.consumeText()
text = string(text[:len(text)-2])
text = text[:len(text)-2]
value := reg.FindStringSubmatch(text)
if value == nil {
parser, err := parseAction("text", text)