code: func (tx *transaction) Rollback() error {
  	// Prevent rollbacks on managed transactions.
  	if tx.managed {
  		tx.close()
  		panic("managed transaction rollback not allowed")
  	}
  
  	// Ensure transaction state is valid.
  	if err := tx.checkClosed(); err != nil {
  		return err
  	}
  
  	tx.close()
  	return nil
  }
docs: // Rollback undoes all changes that have been made to the root bucket and all of
  // its sub-buckets.
  //
  // This function is part of the database.Tx interface implementation.