Maybe you're importing it somewhere else in your main package. In any
case, adding an anonymous import in one of your _test.go-files should do
the trick.
On 15.10.20 03:53, farid sobhany wrote:
I am using database/sql to connect to a Mssql server and it works when I
run the application. But when I setup a test file and tried to call the
function that makes the connection and store it in an instance, it
complains about "Unknown driver \"mssql\" (forgotten import?)"
I am not importing the driver in the main file and it works fine. Why
does it complain when running the test funciton?
--
You received this message because you are subscribed to the Google
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/e8a43561-551b-44e1-8605-283ce1f064b0n%40googlegroups.com
<https://groups.google.com/d/msgid/golang-nuts/e8a43561-551b-44e1-8605-283ce1f064b0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Gregor Best
[email protected]
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/095d7c8b-251c-8112-ba6d-55cf590e65e2%40pferdewetten.de.