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

Function tableLookup

pkg/chart/common/values.go:84–101  ·  view source on GitHub ↗
(v Values, simple string)

Source from the content-addressed store, hash-verified

82}
83
84func tableLookup(v Values, simple string) (Values, error) {
85 v2, ok := v[simple]
86 if !ok {
87 return v, ErrNoTable{simple}
88 }
89 if vv, ok := v2.(map[string]any); ok {
90 return vv, nil
91 }
92
93 // This catches a case where a value is of type Values, but doesn't (for some
94 // reason) match the map[string]interface{}. This has been observed in the
95 // wild, and might be a result of a nil map of type Values.
96 if vv, ok := v2.(Values); ok {
97 return vv, nil
98 }
99
100 return Values{}, ErrNoTable{simple}
101}
102
103// ReadValues will parse YAML byte data into a Values.
104func ReadValues(data []byte) (vals Values, err error) {

Callers 1

TableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…