remove removes and returns a task by ID (internal implementation)
(id string)
| 84 | |
| 85 | // remove removes and returns a task by ID (internal implementation) |
| 86 | func (ts *TaskStorage) remove(id string) task.Task { |
| 87 | if element, ok := ts.idIndex[id]; ok { |
| 88 | t := ts.items.Remove(element) |
| 89 | delete(ts.idIndex, id) |
| 90 | return t |
| 91 | } |
| 92 | return nil |
| 93 | } |
| 94 | |
| 95 | // removeElement removes an element from the list and updates the index (internal implementation) |
| 96 | func (ts *TaskStorage) removeElement(element *list.Element[task.Task]) task.Task { |
no test coverage detected