Push a value onto the top of the Stack
(value int32)
| 38 | |
| 39 | // Push a value onto the top of the Stack |
| 40 | func (s *Stack) Push(value int32) { |
| 41 | s.top++ |
| 42 | if len(s.st) <= s.top { |
| 43 | s.st = append(s.st, value) |
| 44 | } else { |
| 45 | s.st[s.top] = value |
| 46 | } |
| 47 | } |
no outgoing calls
no test coverage detected