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

Function buildChildrenIndex

apps/cli/internal/cli/status.go:298–306  ·  view source on GitHub ↗
(tasks []*model.Task)

Source from the content-addressed store, hash-verified

296}
297
298func buildChildrenIndex(tasks []*model.Task) map[string][]*model.Task {
299 index := make(map[string][]*model.Task)
300 for _, t := range tasks {
301 if t.Parent != "" {
302 index[t.Parent] = append(index[t.Parent], t)
303 }
304 }
305 return index
306}
307
308func collectChildrenTree(taskID string, index map[string][]*model.Task, visited map[string]bool) []statusChild {
309 children := index[taskID]

Callers 2

runStatusSingleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected