code: func (b *Bucket) ForEach(fn func(k, v []byte) error) error {
  	if b.tx.db == nil {
  		return ErrTxClosed
  	}
  	c := b.Cursor()
  	for k, v := c.First(); k != nil; k, v = c.Next() {
  		if err := fn(k, v); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // 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 provided function must not modify
  // the bucket; this will result in undefined behavior.