Skip to content

GoDoc suggests importing wrong module version #27459

Closed
@gbrlsnchs

Description

@gbrlsnchs

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions