MCPcopy Index your code
hub / github.com/helm/helm / ParseFile

Function ParseFile

pkg/strvals/parser.go:90–96  ·  view source on GitHub ↗

ParseFile parses a set line, but its final value is loaded from the file at the path specified by the original value. A set line is of the form name1=path1,name2=path2 When the files at path1 and path2 contained "val1" and "val2" respectively, the set line is consumed as name1=val1,name2=val2

(s string, reader RunesValueReader)

Source from the content-addressed store, hash-verified

88// When the files at path1 and path2 contained "val1" and "val2" respectively, the set line is consumed as
89// name1=val1,name2=val2
90func ParseFile(s string, reader RunesValueReader) (map[string]any, error) {
91 vals := map[string]any{}
92 scanner := bytes.NewBufferString(s)
93 t := newFileParser(scanner, vals, reader)
94 err := t.parse()
95 return vals, err
96}
97
98// ParseIntoString parses a strvals line and merges the result into dest.
99//

Callers 1

TestParseFileFunction · 0.70

Calls 2

newFileParserFunction · 0.85
parseMethod · 0.45

Tested by 1

TestParseFileFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…