gotests icon indicating copy to clipboard operation
gotests copied to clipboard

Testing sql.DB usage

Open itsjamie opened this issue 8 years ago • 2 comments

Similar to #14, when sql.DB is detected as one of the arguments to the function or as a struct fields, perhaps the https://github.com/DATA-DOG/go-sqlmock could be included to provide a mock database connection?

itsjamie avatar Nov 07 '16 01:11 itsjamie

I would prefer to avoid having third-party dependencies when generating tests. However I would like to have a way for someone to define their own "templates" for handling special scenarios like the one you mentioned.

cweill avatar Nov 07 '16 04:11 cweill

i want mock http , this package can support ? or use third-party dependencies

baixiaoshi avatar Oct 25 '19 07:10 baixiaoshi