MCPcopy
hub / github.com/helm/helm / runesUntil

Function runesUntil

pkg/strvals/parser.go:504–522  ·  view source on GitHub ↗
(in io.RuneReader, stop map[rune]bool)

Source from the content-addressed store, hash-verified

502}
503
504func runesUntil(in io.RuneReader, stop map[rune]bool) ([]rune, rune, error) {
505 v := []rune{}
506 for {
507 switch r, _, e := in.ReadRune(); {
508 case e != nil:
509 return v, r, e
510 case inMap(r, stop):
511 return v, r, nil
512 case r == '\\':
513 next, _, e := in.ReadRune()
514 if e != nil {
515 return v, next, e
516 }
517 v = append(v, next)
518 default:
519 v = append(v, r)
520 }
521 }
522}
523
524func inMap(k rune, m map[rune]bool) bool {
525 _, ok := m[k]

Callers 5

keyMethod · 0.85
keyIndexMethod · 0.85
listItemMethod · 0.85
valMethod · 0.85
valListMethod · 0.85

Calls 1

inMapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…