Add Err() method to Nexter interface
This commit is contained in:
parent
6aad2b1818
commit
e07838857f
1 changed files with 6 additions and 1 deletions
|
|
@ -155,9 +155,14 @@ type Description struct {
|
||||||
|
|
||||||
type Nexter interface {
|
type Nexter interface {
|
||||||
// Next advances the iterator to the next value, which will then be available through
|
// 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
|
Next() bool
|
||||||
|
|
||||||
|
// Err returns the error (if any) encountered during iteration.
|
||||||
|
Err() error
|
||||||
|
|
||||||
Iterator
|
Iterator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue