(taskID string, index map[string][]*model.Task, visited map[string]bool)
| 306 | } |
| 307 | |
| 308 | func collectChildrenTree(taskID string, index map[string][]*model.Task, visited map[string]bool) []statusChild { |
| 309 | children := index[taskID] |
| 310 | if len(children) == 0 { |
| 311 | return nil |
| 312 | } |
| 313 | result := make([]statusChild, 0, len(children)) |
| 314 | for _, child := range children { |
| 315 | if visited[child.ID] { |
| 316 | continue |
| 317 | } |
| 318 | visited[child.ID] = true |
| 319 | sc := statusChild{ |
| 320 | ID: child.ID, |
| 321 | Title: child.Title, |
| 322 | Status: string(child.Status), |
| 323 | } |
| 324 | sc.Children = collectChildrenTree(child.ID, index, visited) |
| 325 | result = append(result, sc) |
| 326 | } |
| 327 | return result |
| 328 | } |
| 329 | |
| 330 | func outputStatusText(out statusOutput, w io.Writer) error { |
| 331 | r := getRenderer() |
no outgoing calls
no test coverage detected