code: func (tx *Txn) Commit(ctx context.Context) (err error) {
  	if tx.db.closed {
  		return fmt.Errorf("Commit() called on a closed connection")
  	}
  	tx.db.Debug("Commit()")
  
  	if len(tx.ops) == 0 {
  		return nil
  	}
  
  	// go-redis
  
  	pipeline := tx.db.client.TxPipeline()
  	for _, op := range tx.ops {
  		if op.del {
  			pipeline.Del(op.key)
  		} else {
  			pipeline.Set(op.key, op.value, 0)
  		}
  	}
  	_, err = pipeline.Exec()
  	if err != nil {
  		// Redis cluster won't let you run multi-key commands in case of cross slot.
  		// - Cross slot check may be useful indicator in case of failure.
  		if _, yes := tx.db.client.(*goredis.ClusterClient); yes {
  			checkCrossSlot(tx)
  		}
  		return fmt.Errorf("%T.Exec() failed: %s", pipeline, err)
  	}
  	return nil
  }
docs: // Commit commits all operations in a transaction to the data store.
  // Commit is atomic - either all operations in the transaction are
  // committed to the data store, or none of them.