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

Function ExampleValues

pkg/chart/common/values_test.go:75–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73}
74
75func ExampleValues() {
76 doc := `
77title: "Moby Dick"
78chapter:
79 one:
80 title: "Loomings"
81 two:
82 title: "The Carpet-Bag"
83 three:
84 title: "The Spouter Inn"
85`
86 d, err := ReadValues([]byte(doc))
87 if err != nil {
88 panic(err)
89 }
90 ch1, err := d.Table("chapter.one")
91 if err != nil {
92 panic("could not find chapter one")
93 }
94 fmt.Print(ch1["title"])
95 // Output:
96 // Loomings
97}
98
99func TestTable(t *testing.T) {
100 doc := `

Callers

nothing calls this directly

Calls 2

ReadValuesFunction · 0.85
TableMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…