MCPcopy
hub / github.com/helm/helm / ToYAML

Function ToYAML

pkg/strvals/parser.go:43–50  ·  view source on GitHub ↗

ToYAML takes a string of arguments and converts to a YAML document.

(s string)

Source from the content-addressed store, hash-verified

41
42// ToYAML takes a string of arguments and converts to a YAML document.
43func ToYAML(s string) (string, error) {
44 m, err := Parse(s)
45 if err != nil {
46 return "", err
47 }
48 d, err := yaml.Marshal(m)
49 return strings.TrimSuffix(string(d), "\n"), err
50}
51
52// Parse parses a set line.
53//

Callers 1

TestToYAMLFunction · 0.85

Calls 1

ParseFunction · 0.70

Tested by 1

TestToYAMLFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…