MCPcopy Create free account
hub / github.com/driangle/taskmd / WriteYAML

Function WriteYAML

apps/cli/internal/cli/format.go:21–26  ·  view source on GitHub ↗

WriteYAML encodes v as YAML to w.

(w io.Writer, v any)

Source from the content-addressed store, hash-verified

19
20// WriteYAML encodes v as YAML to w.
21func WriteYAML(w io.Writer, v any) error {
22 enc := yaml.NewEncoder(w)
23 enc.SetIndent(2)
24 defer enc.Close()
25 return enc.Encode(v)
26}
27
28// ValidateFormat checks that format is one of the supported values.
29func ValidateFormat(format string, supported []string) error {

Callers 15

TestWriteYAMLFunction · 0.85
runNextAllProjectsFunction · 0.85
outputNextYAMLFunction · 0.85
runTagsFunction · 0.85
outputStatusListEmptyFunction · 0.85
runStatusSingleFunction · 0.85
runTracksFunction · 0.85
runProjectsFunction · 0.85
printImportResultFunction · 0.85
runStatsFunction · 0.85
runSearchFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestWriteYAMLFunction · 0.68
captureSearchOutputFunction · 0.68
TestTodosList_YAMLOutputFunction · 0.68