Keys returns an iterator that loops over all task keys in the order specified by the sorter.
(sorter sort.Sorter)
| 97 | // Keys returns an iterator that loops over all task keys in the order specified |
| 98 | // by the sorter. |
| 99 | func (t *Tasks) Keys(sorter sort.Sorter) iter.Seq[string] { |
| 100 | return func(yield func(string) bool) { |
| 101 | for k := range t.All(sorter) { |
| 102 | if !yield(k) { |
| 103 | return |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | // Values returns an iterator that loops over all task values in the order |
| 110 | // specified by the sorter. |