code: func (b *bucket) ForEachBucket(fn func(k []byte) error) error {
  	// Ensure transaction state is valid.
  	if err := b.tx.checkClosed(); err != nil {
  		return err
  	}
  
  	// Invoke the callback for each cursor item.  Return the error returned
  	// from the callback when it is non-nil.
  	c := newCursor(b, b.id[:], ctBuckets)
  	defer cursorFinalizer(c)
  	for ok := c.First(); ok; ok = c.Next() {
  		err := fn(c.Key())
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // ForEachBucket invokes the passed function with the key of every nested bucket
  // in the current bucket.  This does not include any nested buckets within those
  // nested buckets.
  //
  // WARNING: It is not safe to mutate data while iterating with this method.
  // Doing so may cause the underlying cursor to be invalidated and return
  // unexpected keys.
  //
  // Returns the following errors as required by the interface contract:
  //   - ErrTxClosed if the transaction has already been closed
  //
  // NOTE: The values returned by this function are only valid during a
  // transaction.  Attempting to access them after a transaction has ended will
  // likely result in an access violation.
  //
  // This function is part of the database.Bucket interface implementation.