gocenter icon indicating copy to clipboard operation
gocenter copied to clipboard

GoCenter is serving bad timestamps for pseudo-versions

Open elioengcomp opened this issue 5 years ago • 2 comments

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.

elioengcomp avatar Mar 30 '20 16:03 elioengcomp

Do you have any examples for how to do the workaround?

jpopadak avatar Apr 08 '20 19:04 jpopadak

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
)

elioengcomp avatar Apr 08 '20 20:04 elioengcomp