Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoDoc suggests importing wrong module version #27459

Closed
gbrlsnchs opened this issue Sep 3, 2018 · 1 comment
Closed

GoDoc suggests importing wrong module version #27459

gbrlsnchs opened this issue Sep 3, 2018 · 1 comment

Comments

@gbrlsnchs
Copy link

gbrlsnchs commented Sep 3, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

Go1.11.

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/gabriel/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gabriel/go"
GOPROXY=""
GORACE=""
GOROOT="/home/gabriel/.goenv/versions/1.11.0"
GOTMPDIR=""
GOTOOLDIR="/home/gabriel/.goenv/versions/1.11.0/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build149680875=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I have just released a v2 of github.com/gbrlsnchs/jwt and from now on, people must import it as below:

import (
	// ...

	github.com/gbrlsnchs/jwt/v2
)

Still, when accessing godoc.org/github.com/gbrlsnchs/jwt, the first line tells me to use import github.com/gbrlsnchs/jwt.

What did you expect to see?

GoDoc suggesting a import path matching what's in go.mod file in the master branch. In this case, import github.com/gbrlsnchs/jwt/v2.

What did you see instead?

import github.com/gbrlsnchs/jwt

@agnivade
Copy link
Contributor

agnivade commented Sep 3, 2018

Tracked here - golang/gddo#567.

Please feel free to subscribe/comment on that.

@agnivade agnivade closed this as completed Sep 3, 2018
@golang golang locked and limited conversation to collaborators Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants