func (tm *TransactionManager) StartTransaction(id, connectionID string) error {
	internalTxId := internalTxId(id, connectionID)
	_, ok := tm.transactions[internalTxId]
	if ok {
		return errors.New("transaction with this ID already exists")
	}

	tm.transactions[internalTxId] = Transaction{
		frames: []Frame{},
	}

	log.Printf("client %s: created transaction %s\n", connectionID, id)

	return nil
}
// StartTransaction is called when engine interprets a BEGIN frame
// adds a new transaction to the map iff no transaction with this id for this client exists
StartTransaction is called when engine interprets a BEGIN frame
adds a new transaction to the map iff no transaction with this id for this client exists
// StartTransaction is called when engine interprets a BEGIN frame // adds a new transaction to the map iff no transaction with this id for this client exists
func (tm *TransactionManager) StartTransaction(id, connectionID string) error {
	internalTxId := internalTxId(id, connectionID)
	_, ok := tm.transactions[internalTxId]
	if ok {
		return errors.New("transaction with this ID already exists")
	}
	tm.transactions[internalTxId] = Transaction{
		frames: []Frame{},
	}
	log.Printf("client %s: created transaction %s\n", connectionID, id)
	return nil
}
func ( tm * TransactionManager ) StartTransaction ( id , connectionID string ) error { internalTxId := internalTxId ( id , connectionID ) _ , ok := tm . transactions [ internalTxId ] if ok { return errors . New ( " " ) } tm . transactions [ internalTxId ] = Transaction { frames : [ ] Frame { } , } log . Printf ( " \n " , connectionID , id ) return nil }
StartTransaction is called when engine interprets a BEGIN frame
adds a new transaction to the map iff no transaction with this id for this client exists
StartTransaction is called when engine interprets a BEGIN frame adds a new transaction to the map iff no transaction with this id for this client exists