Closed KillerX closed 5 years ago
Hi, most likely something is not right with the module name
I think the module name in go.mod
is incorrect. The following change fixes it for me:
-module sqlmock
+module gopkg.in/DATA-DOG/go-sqlmock.v1
is it a good practice to have a gopkg.in/DATA-DOG/go-sqlmock.v1
gopkg module name? or it should rather be github.com/DATA-DOG/go-sqlmock
since modules support versioning
Initialize go.mod
with:
$ go mod init github.com/DATA-DOG/go-sqlmock
You don't need gopkg.in
at all.
@l3pp4rd you can now start to migrate away from gopkg.in
(if you want). i mean docs, examples, etc...
@philtay would you be kind to create a pull request?
@l3pp4rd I can't right now, but the commands below should be enough:
$ sed -i 's/gopkg.in\/DATA-DOG\/go-sqlmock.v1/github.com\/DATA-DOG\/go-sqlmock/g' <files ... e.g. README.md>
$ git commit -a -m "Hello SemVer!"
$ git push
Seems to work, do not forget to fix the README as well to use github.com/DATA-DOG/go-sqlmock
(go get
and import (...)
).
Thanks for breaking all our go.mod files and imports. ðŸ˜
On Mac, here is the fixed sed
command to change import path:
$ sed -i '' 's/gopkg.in\/DATA-DOG\/go-sqlmock.v1/github.com\/DATA-DOG\/go-sqlmock/g' *.go
@dolmen You're welcome!
Any idea what is going on here? This has been happening for us since the 1.3.1 release.