From d589639e75f624ad3a2932315e4c088e136508d2 Mon Sep 17 00:00:00 2001 From: Cong Ding Date: Fri, 22 Jun 2018 16:39:13 -0700 Subject: [PATCH] cleanup: remove deadcode Kubernetes-commit: 3bacb04a5f9805bb83e016e341a49d0f13a43598 --- util/jsonpath/parser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/jsonpath/parser.go b/util/jsonpath/parser.go index ef0f9213..99b45849 100644 --- a/util/jsonpath/parser.go +++ b/util/jsonpath/parser.go @@ -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)