diff --git a/graph/iterator.go b/graph/iterator.go index 01a0358..86d0fd9 100644 --- a/graph/iterator.go +++ b/graph/iterator.go @@ -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 }