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

Function outputGetText

apps/cli/internal/cli/get.go:406–431  ·  view source on GitHub ↗
(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, w io.Writer)

Source from the content-addressed store, hash-verified

404}
405
406func outputGetText(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, w io.Writer) error {
407 r := getRenderer()
408
409 fmt.Fprintf(w, "%s %s\n", formatLabel("Task:", r), formatTaskID(task.ID, r))
410 fmt.Fprintf(w, "%s %s\n", formatLabel("Title:", r), task.Title)
411 fmt.Fprintf(w, "%s %s\n", formatLabel("Status:", r), formatStatus(string(task.Status), r))
412 printOptionalField(w, "Priority", string(task.Priority), r)
413 printOptionalField(w, "Effort", string(task.Effort), r)
414 printOptionalField(w, "Type", string(task.Type), r)
415 printOptionalField(w, "Phase", task.Phase, r)
416 printTags(w, task.Tags, r)
417 printPRs(w, task.PRs, r)
418 if deps.Parent != nil {
419 fmt.Fprintf(w, "%s %s\n", formatLabel("Parent:", r), formatDepEntry(*deps.Parent, r))
420 }
421 if !task.Created.IsZero() {
422 fmt.Fprintf(w, "%s %s\n", formatLabel("Created:", r), task.Created.Format("2006-01-02"))
423 }
424 fmt.Fprintf(w, "%s %s\n", formatLabel("File:", r), formatDim(task.FilePath, r))
425 printWorklogInfo(w, wl, r)
426 printDescription(w, task.Body, r, getRawMarkdown)
427 printDependencies(w, deps, r)
428 printChildren(w, deps.Children, r)
429 printGetContextFiles(w, ctxFiles, r)
430 return nil
431}
432
433func printWorklogInfo(w io.Writer, wl *worklogInfo, r *lipgloss.Renderer) {
434 if wl == nil {

Callers 1

outputGetFunction · 0.85

Calls 14

getRendererFunction · 0.85
formatLabelFunction · 0.85
formatTaskIDFunction · 0.85
formatStatusFunction · 0.85
printOptionalFieldFunction · 0.85
printTagsFunction · 0.85
printPRsFunction · 0.85
formatDepEntryFunction · 0.85
formatDimFunction · 0.85
printWorklogInfoFunction · 0.85
printDescriptionFunction · 0.85
printDependenciesFunction · 0.85

Tested by

no test coverage detected