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

Method Find

todo.go:334–346  ·  view source on GitHub ↗
(index string)

Source from the content-addressed store, hash-verified

332}
333
334func (t *taskListImpl) Find(index string) Task {
335 numericIndex := indexFromString(index)
336 if numericIndex == nil {
337 return nil
338 }
339 var node TaskNode = t // -golint
340 for _, i := range numericIndex {
341 if node = node.At(i); node == nil {
342 return nil
343 }
344 }
345 return node.(Task)
346}
347
348// FindAll recursively returns all matching nodes.
349func (t *taskListImpl) FindAll(predicate func(task Task) bool) []Task {

Callers

nothing calls this directly

Calls 2

AtMethod · 0.95
indexFromStringFunction · 0.85

Tested by

no test coverage detected