MCPcopy Create free account
hub / github.com/devspace-sh/devspace / ToYAML

Function ToYAML

pkg/util/strvals/strvals.go:51–58  ·  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

49
50// ToYAML takes a string of arguments and converts to a YAML document.
51func ToYAML(s string) (string, error) {
52 m, err := Parse(s)
53 if err != nil {
54 return "", err
55 }
56 d, err := yaml.Marshal(m)
57 return strings.TrimSuffix(string(d), "\n"), err
58}
59
60// Parse parses a set line.
61//

Callers

nothing calls this directly

Calls 1

ParseFunction · 0.70

Tested by

no test coverage detected