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

Method PathValue

pkg/chart/common/values.go:144–149  ·  view source on GitHub ↗

PathValue takes a path that traverses a YAML structure and returns the value at the end of that path. The path starts at the root of the YAML structure and is comprised of YAML keys separated by periods. Given the following YAML data the value at path "chapter.one.title" is "Loomings". chapter:

(path string)

Source from the content-addressed store, hash-verified

142// one:
143// title: "Loomings"
144func (v Values) PathValue(path string) (any, error) {
145 if path == "" {
146 return nil, errors.New("YAML path cannot be empty")
147 }
148 return v.pathValue(parsePath(path))
149}
150
151func (v Values) pathValue(path []string) (any, error) {
152 if len(path) == 1 {

Calls 2

pathValueMethod · 0.95
parsePathFunction · 0.70