MCPcopy
hub / github.com/kubernetes/client-go / parseText

Method parseText

util/jsonpath/parser.go:119–136  ·  view source on GitHub ↗
(cur *ListNode)

Source from the content-addressed store, hash-verified

117}
118
119func (p *Parser) parseText(cur *ListNode) error {
120 for {
121 if strings.HasPrefix(p.input[p.pos:], leftDelim) {
122 if p.pos > p.start {
123 cur.append(newText(p.consumeText()))
124 }
125 return p.parseLeftDelim(cur)
126 }
127 if p.next() == eof {
128 break
129 }
130 }
131 // Correctly reached EOF.
132 if p.pos > p.start {
133 cur.append(newText(p.consumeText()))
134 }
135 return nil
136}
137
138// parseLeftDelim scans the left delimiter, which is known to be present.
139func (p *Parser) parseLeftDelim(cur *ListNode) error {

Callers 2

ParseMethod · 0.95
parseRightDelimMethod · 0.95

Calls 5

consumeTextMethod · 0.95
parseLeftDelimMethod · 0.95
nextMethod · 0.95
newTextFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected