Cannot update to v2.1 when using gomod
dcormier opened this issue · comments
Using go get -u github.com/jolestar/go-commons-pool@v2.1.0
to attempt to update to 2.1 results in this error:
go: finding github.com/jolestar/go-commons-pool v2.1.0
go: finding github.com/jolestar/go-commons-pool v2.1.0
go get github.com/jolestar/go-commons-pool@v2.1.0: github.com/jolestar/go-commons-pool@v2.1.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
To resolve this, the module needs to refer to itself as github.com/jolestar/go-commons-pool/v2
, as per the documentation, and likely the commit should be tagged as a new release (v2.1.1
, at least).
Should move source file to /v2 folder?
@dcormier Can you help to release a new version? I haven't used the Golang for a long time.
Hm. It's still uncooperative. I'll have to investigate more.
$ go get -u github.com/jolestar/go-commons-pool@v2.1.1
go: finding github.com/jolestar/go-commons-pool v2.1.1
go: finding github.com/jolestar/go-commons-pool v2.1.1
go get github.com/jolestar/go-commons-pool@v2.1.1: github.com/jolestar/go-commons-pool@v2.1.1: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
@dcormier you change go.mod to github.com/jolestar/go-commons-pool/v2.
now need run go get github.com/jolestar/go-commons-pool/v2
And, I think it would be better without v2
And, I think it would be better without v2
That would be nice, but I don't see how to do that without a whole new repo/import path. See official guidance on module versioning, here.