Add Err() method to Nexter interface

This commit is contained in:
Andrew Dunham 2015-04-14 16:33:32 -07:00
parent 6aad2b1818
commit e07838857f

View file

@ -155,9 +155,14 @@ type Description struct {
type Nexter interface {
// Next advances the iterator to the next value, which will then be available through
// the Result method. It returns false if no further advancement is possible.
// the Result method. It returns false if no further advancement is possible, or if an
// error was encountered during iteration. Err should be consulted to distinguish
// between the two cases.
Next() bool
// Err returns the error (if any) encountered during iteration.
Err() error
Iterator
}