Push adds a new item to the last position of the stack
(id int)
| 53 | |
| 54 | // Push adds a new item to the last position of the stack |
| 55 | func (s *Stack) Push(id int) *list.Element { |
| 56 | s.lock.Lock() |
| 57 | defer s.lock.Unlock() |
| 58 | return s.items.PushBack(id) |
| 59 | } |
| 60 | |
| 61 | // Prepend adds a list to the front of the stack |
| 62 | func (s *Stack) Prepend(items *list.List) { |
no outgoing calls