aboutsummaryrefslogtreecommitdiff
path: root/bucket.go
diff options
context:
space:
mode:
Diffstat (limited to 'bucket.go')
-rw-r--r--bucket.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bucket.go b/bucket.go
index e1ad2a3..3e3392c 100644
--- a/bucket.go
+++ b/bucket.go
@@ -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() {