diff options
-rw-r--r-- | bucket.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -115,7 +115,8 @@ func (b *Bucket) NextSequence() (int, error) { } // ForEach executes a function for each key/value pair in a bucket. -// An error is returned if the bucket cannot be found. +// If the provided function returns an error then the iteration is stopped and +// the error is returned to the caller. func (b *Bucket) ForEach(fn func(k, v []byte) error) error { c := b.Cursor() for k, v := c.First(); k != nil; k, v = c.Next() { |