DATA-DOG / go-sqlmock

Sql mock driver for golang to test database interactions
Other
6.06k stars 408 forks source link

GoModules naming problem #166

Closed im-kulikov closed 5 years ago

im-kulikov commented 5 years ago
→ go get -u gopkg.in/DATA-DOG/go-sqlmock.v1
go: gopkg.in/DATA-DOG/go-sqlmock.v1@v1.3.2: go.mod has non-....v1 module path "github.com/DATA-DOG/go-sqlmock" at revision v1.3.2
go: error loading module requirements

Problem with module naming here from commit

module github.com/DATA-DOG/go-sqlmock

In documentation:

go get gopkg.in/DATA-DOG/go-sqlmock.v1
l3pp4rd commented 5 years ago

Hi, yes this was misleading, since the tag was created before renaming. Just recently made another tag v1.3.3 in order to prevent these misunderstandings in the future, caused by migration to module.

im-kulikov commented 5 years ago

Thanks..

jeffreylo commented 5 years ago

I think this is still an issue:

λ go get -u gopkg.in/DATA-DOG/go-sqlmock.v1
go: gopkg.in/DATA-DOG/go-sqlmock.v1@v1.3.3: go.mod has non-....v1 module path "github.com/DATA-DOG/go-sqlmock" at revision v1.3.3
go get: error loading module requirements

Should go.mod record the fully qualified module name, i.e., gopkg.in/DATA-DOG/go-sqlmock.v1?

l3pp4rd commented 5 years ago

Hi @jeffreylo we cannot rely making module name as gopkg.in, that service may just go away any time. Use github.com/DATA-DOG/go-sqmock for go get and anything else.