gocenter
gocenter copied to clipboard
GoCenter is serving bad timestamps for pseudo-versions
As pointed out by @mikesep on Gophers Slack, GoCenter is serving bad timestamp for pseudo-versions in the list operation. This is causing the Go client to use a wrong version as the latest for modules without release tags when the user do not specify which version to fetch.
Example:
→ curl https://gocenter.io/github.com/AlekSi/gocov-xml/@v/list
v0.0.0-20130903134006-d2f6da892a0d 2019-09-22T08:18:12Z
v0.0.0-20180429091052-dee33fe4b4ad 2019-01-24T11:42:27Z
v0.0.0-20190121064608-3a14fb1c4737 2019-01-23T07:24:47Z
Until we have a fix for this, users have a workaround by specifying which version to fetch in their go get commands or go.mod files.
Do you have any examples for how to do the workaround?
Specify which version to fetch using the go get command:
Example:
go get github.com/AlekSi/[email protected]
You can also edit your go.mod file and add the dependency version there as well.
Example:
require (
github.com/AlekSi/gocov-xml v0.0.0-20190121064608-3a14fb1c4737
)