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

Function outputGet

apps/cli/internal/cli/get.go:393–404  ·  view source on GitHub ↗

outputGet routes to the appropriate formatter.

(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, format string)

Source from the content-addressed store, hash-verified

391
392// outputGet routes to the appropriate formatter.
393func outputGet(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, format string) error {
394 switch format {
395 case "text":
396 return outputGetText(task, deps, ctxFiles, wl, os.Stdout)
397 case "json":
398 return outputGetJSON(task, deps, ctxFiles, wl, os.Stdout)
399 case "yaml":
400 return outputGetYAML(task, deps, ctxFiles, wl, os.Stdout)
401 default:
402 return fmt.Errorf("unsupported format: %s (supported: text, json, yaml)", format)
403 }
404}
405
406func outputGetText(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, w io.Writer) error {
407 r := getRenderer()

Callers 1

runGetFunction · 0.85

Calls 3

outputGetTextFunction · 0.85
outputGetJSONFunction · 0.85
outputGetYAMLFunction · 0.85

Tested by

no test coverage detected