MCPcopy Create free account
hub / github.com/flant/shell-operator / removeElement

Method removeElement

pkg/task/queue/task_storage.go:96–100  ·  view source on GitHub ↗

removeElement removes an element from the list and updates the index (internal implementation)

(element *list.Element[task.Task])

Source from the content-addressed store, hash-verified

94
95// removeElement removes an element from the list and updates the index (internal implementation)
96func (ts *TaskStorage) removeElement(element *list.Element[task.Task]) task.Task {
97 t := ts.items.Remove(element)
98 delete(ts.idIndex, t.GetId())
99 return t
100}
101
102// Public methods (with locking)
103

Callers 1

RemoveElementMethod · 0.95

Calls 2

RemoveMethod · 0.65
GetIdMethod · 0.65

Tested by

no test coverage detected