go-sqlmock icon indicating copy to clipboard operation
go-sqlmock copied to clipboard

How to simulate the method of passing in *Sql.Tx parameters

Open jmuwfq opened this issue 5 years ago • 0 comments
trafficstars

Like this:

func (userDao *UserDao) UpdateByTx(tx *sql.Tx, user *User) (id int32, err error) {
	tx.Exec(....)
}

How to simulate tx.Exec(), I tried many times but failed

jmuwfq avatar Jun 23 '20 01:06 jmuwfq