Save returns the current position of the iterator which we can use for restoring later.
()
| 107 | |
| 108 | // Save returns the current position of the iterator which we can use for restoring later. |
| 109 | func (p *ItemIterator) Save() int { |
| 110 | return p.idx |
| 111 | } |
| 112 | |
| 113 | // Peek returns the next n items without consuming them. |
| 114 | func (p *ItemIterator) Peek(num int) ([]Item, error) { |
no outgoing calls