func TxCommit(tx *sql.Tx) error {
	err := tx.Commit()
	if err == nil || err == sql.ErrTxDone { // Ignore duplicate commits/rollbacks
		return nil
	}
	return err
}
func TxCommit(tx *sql.Tx) error {
	err := tx.Commit()
	if err == nil || err == sql.ErrTxDone { 
		return nil
	}
	return err
}
func TxCommit ( tx * sql . Tx ) error { err := tx . Commit ( ) if err == nil || err == sql . ErrTxDone { // Ignore duplicate commits/rollbacks return nil } return err }
// TxCommit commits the given transaction.
TxCommit commits the given transaction .