1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-07-05 00:38:45 +02:00

Added SqlMock type to allow for options to be sent to function that creates the sqlmock

This commit is contained in:
Woody1193
2022-12-22 16:39:33 +09:00
parent 44e746a20e
commit a04eaa2c39
3 changed files with 9 additions and 6 deletions

View File

@ -98,7 +98,7 @@ type sqlmock struct {
expected []expectation
}
func (c *sqlmock) open(options []func(*sqlmock) error) (*sql.DB, Sqlmock, error) {
func (c *sqlmock) open(options []SqlMockOption) (*sql.DB, Sqlmock, error) {
db, err := sql.Open("sqlmock", c.dsn)
if err != nil {
return db, c, err