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

Function writeChildrenTree

apps/cli/internal/cli/status.go:371–388  ·  view source on GitHub ↗
(w io.Writer, children []statusChild, prefix string, r *lipgloss.Renderer)

Source from the content-addressed store, hash-verified

369}
370
371func writeChildrenTree(w io.Writer, children []statusChild, prefix string, r *lipgloss.Renderer) {
372 for i, child := range children {
373 isLast := i == len(children)-1
374 connector := "├─"
375 if isLast {
376 connector = "└─"
377 }
378 fmt.Fprintf(w, "%s%s %s [%s] %s\n", prefix, connector,
379 formatTaskID(child.ID, r), formatStatus(child.Status, r), child.Title)
380 if len(child.Children) > 0 {
381 childPrefix := prefix + "│ "
382 if isLast {
383 childPrefix = prefix + " "
384 }
385 writeChildrenTree(w, child.Children, childPrefix, r)
386 }
387 }
388}
389
390func printStatusOptionalField(w io.Writer, label, value string, r *lipgloss.Renderer) {
391 if value == "" {

Callers 1

outputStatusTextFunction · 0.85

Calls 2

formatTaskIDFunction · 0.85
formatStatusFunction · 0.85

Tested by

no test coverage detected