MCPcopy
hub / github.com/helm/helm / emptyVal

Method emptyVal

pkg/strvals/parser.go:441–458  ·  view source on GitHub ↗

check for an empty value read and consume optional spaces until comma or EOF (empty val) or any other char (not empty val) comma and spaces are consumed, while any other char is not consumed

()

Source from the content-addressed store, hash-verified

439// read and consume optional spaces until comma or EOF (empty val) or any other char (not empty val)
440// comma and spaces are consumed, while any other char is not consumed
441func (t *parser) emptyVal() (bool, error) {
442 for {
443 r, _, e := t.sc.ReadRune()
444 if e == io.EOF {
445 return true, nil
446 }
447 if e != nil {
448 return false, e
449 }
450 if r == ',' {
451 return true, nil
452 }
453 if !unicode.IsSpace(r) {
454 t.sc.UnreadRune()
455 return false, nil
456 }
457 }
458}
459
460func (t *parser) val() ([]rune, error) {
461 stop := runeSet([]rune{','})

Callers 2

keyMethod · 0.95
listItemMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected