Close releases the iterator, making it unusable.
()
| 21 | |
| 22 | // Close releases the iterator, making it unusable. |
| 23 | func (it *Iterator) Close() error { |
| 24 | if it.it != nil { |
| 25 | it.it.Release() // Release the underlying iterator. |
| 26 | it.it = nil // Set the iterator to nil to prevent further use. |
| 27 | } |
| 28 | return nil |
| 29 | } |
| 30 | |
| 31 | // Valid returns whether the iterator is positioned at a valid item. |
| 32 | func (it *Iterator) Valid() bool { |
nothing calls this directly
no outgoing calls
no test coverage detected