mirror of https://github.com/hak5/bolt.git
commit
51f99c8624
|
@ -346,7 +346,8 @@ func (b *Bucket) NextSequence() (uint64, error) {
|
|||
|
||||
// ForEach executes a function for each key/value pair in a bucket.
|
||||
// If the provided function returns an error then the iteration is stopped and
|
||||
// the error is returned to the caller.
|
||||
// the error is returned to the caller. The provided function must not modify
|
||||
// the bucket; this will result in undefined behavior.
|
||||
func (b *Bucket) ForEach(fn func(k, v []byte) error) error {
|
||||
if b.tx.db == nil {
|
||||
return ErrTxClosed
|
||||
|
|
Loading…
Reference in New Issue