cleanup: remove deadcode

Kubernetes-commit: 3bacb04a5f9805bb83e016e341a49d0f13a43598
This commit is contained in:
Cong Ding 2018-06-22 16:39:13 -07:00 committed by Kubernetes Publisher
parent eab6917126
commit d589639e75

View File

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