Len gets the number of items on the stack
()
| 22 | |
| 23 | // Len gets the number of items on the stack |
| 24 | func (s *Stack) Len() int { |
| 25 | s.lock.Lock() |
| 26 | defer s.lock.Unlock() |
| 27 | return s.items.Len() |
| 28 | } |
| 29 | |
| 30 | // Pop pops the first item from the stack |
| 31 | func (s *Stack) Pop() int { |