Pop pops the most recently added CommitNode from the stack
()
| 28 | |
| 29 | // Pop pops the most recently added CommitNode from the stack |
| 30 | func (l *commitNodeLifo) Pop() (CommitNode, bool) { |
| 31 | if len(l.l) == 0 { |
| 32 | return nil, false |
| 33 | } |
| 34 | c := l.l[len(l.l)-1] |
| 35 | l.l = l.l[:len(l.l)-1] |
| 36 | return c, true |
| 37 | } |
| 38 | |
| 39 | // Peek returns the most recently added CommitNode from the stack without removing it |
| 40 | func (l *commitNodeLifo) Peek() (CommitNode, bool) { |
nothing calls this directly
no outgoing calls
no test coverage detected