-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mocking for gorm failed #221
Comments
many people are using gorm, I'm sure you are doing something wrong. |
source code was simplified for demo, but added it to avoid confusion |
You can try add
and
To your |
What version of Go are you using (go version)?
go version go1.14 darwin/amd64
github.com/DATA-DOG/go-sqlmock v1.4.1
github.com/jinzhu/gorm v1.9.12
Which database and its version are you using?
postgres 10.11
description?
Basically it's very simple from readme of https://github.com/DATA-DOG/go-sqlmock, with little change, I tried to mock in project, but got the below issue, and so copied the sample from sqlmock repo, and tried, and got the same,
Can someone pls help? didn't use gorm and sqlmock before. thanks very much,
Please provide a complete runnable program to reproduce your issue. IMPORTANT
The text was updated successfully, but these errors were encountered: