MCPcopy
hub / github.com/spf13/cobra / GenYaml

Function GenYaml

doc/yaml_docs.go:88–90  ·  view source on GitHub ↗

GenYaml creates yaml output.

(cmd *cobra.Command, w io.Writer)

Source from the content-addressed store, hash-verified

86
87// GenYaml creates yaml output.
88func GenYaml(cmd *cobra.Command, w io.Writer) error {
89 return GenYamlCustom(cmd, w, func(s string) string { return s })
90}
91
92// GenYamlCustom creates custom yaml output.
93func GenYamlCustom(cmd *cobra.Command, w io.Writer, linkHandler func(string) string) error {

Callers 4

TestGenYamlDocFunction · 0.85
TestGenYamlNoTagFunction · 0.85
TestGenYamlDocRunnableFunction · 0.85
BenchmarkGenYamlToFileFunction · 0.85

Calls 1

GenYamlCustomFunction · 0.85

Tested by 4

TestGenYamlDocFunction · 0.68
TestGenYamlNoTagFunction · 0.68
TestGenYamlDocRunnableFunction · 0.68
BenchmarkGenYamlToFileFunction · 0.68