ValidForPrefix returns false when iteration is done or when the current key is not prefixed by the specified prefix.
(prefix []byte)
| 529 | // ValidForPrefix returns false when iteration is done |
| 530 | // or when the current key is not prefixed by the specified prefix. |
| 531 | func (it *Iterator) ValidForPrefix(prefix []byte) bool { |
| 532 | return it.Valid() && bytes.HasPrefix(it.item.key, prefix) |
| 533 | } |
| 534 | |
| 535 | // Close would close the iterator. It is important to call this when you're done with iteration. |
| 536 | func (it *Iterator) Close() { |