code: func (tx *Tx) Rollback() error {
  	if tx.funcd {
  		panic("managed tx rollback not allowed")
  	}
  	if tx.db == nil {
  		return ErrTxClosed
  	}
  	// The rollback func does the heavy lifting.
  	if tx.writable {
  		tx.rollbackInner()
  	}
  	// unlock the database for more transactions.
  	tx.unlock()
  	// Clear the db field to disable this transaction from future use.
  	tx.db = nil
  	return nil
  }
docs: // Rollback closes the transaction and reverts all mutable operations that
  // were performed on the transaction such as Set() and Delete().
  //
  // Read-only transactions can only be rolled back, not committed.