MCPcopy Create free account
hub / github.com/alecthomas/devtodo2 / findAll

Function findAll

todo.go:353–362  ·  view source on GitHub ↗
(node TaskNode, predicate func(task Task) bool)

Source from the content-addressed store, hash-verified

351}
352
353func findAll(node TaskNode, predicate func(task Task) bool) []Task {
354 out := []Task{}
355 if n, ok := node.(Task); ok && predicate(n) {
356 out = append(out, n)
357 }
358 for i := 0; i < node.Len(); i++ {
359 out = append(out, findAll(node.At(i), predicate)...)
360 }
361 return out
362}
363
364func (t *taskListImpl) Title() string {
365 return t.title

Callers 1

FindAllMethod · 0.85

Calls 2

LenMethod · 0.65
AtMethod · 0.65

Tested by

no test coverage detected