Item returns the current item.
()
| 81 | |
| 82 | // Item returns the current item. |
| 83 | func (p *ItemIterator) Item() Item { |
| 84 | if p.idx < 0 || p.idx >= len(p.l.items) { |
| 85 | return Item{ |
| 86 | line: -1, // using negative numbers to indicate out-of-range item |
| 87 | column: -1, |
| 88 | } |
| 89 | } |
| 90 | return (p.l.items)[p.idx] |
| 91 | } |
| 92 | |
| 93 | // Prev moves the index back by one. |
| 94 | func (p *ItemIterator) Prev() bool { |
no outgoing calls