Stop stops the iterator. Calling Next on a stopped iterator will return io.EOF, or the error that Next previously returned.
()
| 290 | // Stop stops the iterator. Calling Next on a stopped iterator will return io.EOF, or |
| 291 | // the error that Next previously returned. |
| 292 | func (it *DocumentIterator) Stop() { |
| 293 | if it.err != nil { |
| 294 | return |
| 295 | } |
| 296 | it.err = io.EOF |
| 297 | it.iter.Stop() |
| 298 | } |
| 299 | |
| 300 | // As converts i to driver-specific types. |
| 301 | // See https://gocloud.dev/concepts/as/ for background information, the "As" |