go/doc: doc doesn't work in module mode #27239
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.11 linux/amd64
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/fhz8/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/fhz8/golang"
GOPROXY=""
GORACE=""
GOROOT="/opt/go1.11"
GOTMPDIR=""
GOTOOLDIR="/opt/go1.11/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="g/home/fhz8/src/color1/o.mod"
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-build921500593=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I move source files outside of the gopath.
In directory:
/home/fhz8/src/color1/
edit
go.mod
:then run:
/opt/go1.11/bin/go mod download
next run:
/opt/go1.11/bin/go doc github.com/gookit/color
it output:
What did you expect to see?
It must show the document of the package
color
.What did you see instead?
it output:
The text was updated successfully, but these errors were encountered: