golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.96k stars 17.66k forks source link

x/pkgsite: broken link to internal type #63210

Open jeremybettis opened 1 year ago

jeremybettis commented 1 year ago

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

$ go version
go version go1.20.5 linux/amd64

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jbettis/.cache/go-build"
GOENV="/home/jbettis/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jbettis/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jbettis/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.5"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="x86_64-pc-linux-gnu-clang"
CXX="x86_64-pc-linux-gnu-clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2698240387=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Read the documentation at https://pkg.go.dev/chromium.googlesource.com/chromiumos/platform/tast.git/src/go.chromium.org/tast/core/testing#Test

That package exports a type named Test, which is an alias of a Test struct that is in an internal package.

What did you expect to see?

I expected to see the documentation for testing.Test

What did you see instead?

A broken link to the internal type. There is no way to see the docs for the funcs or Public members of the Test struct.

Source code for public package: https://chromium.googlesource.com/chromiumos/platform/tast/+/15a9a0c3c67a/src/go.chromium.org/tast/core/testing/test.go#21 Source code for internal package: https://chromium.googlesource.com/chromiumos/platform/tast/+/15a9a0c3c67a/src/go.chromium.org/tast/core/internal/testing/test.go#41 Generated doc: https://pkg.go.dev/chromium.googlesource.com/chromiumos/platform/tast.git/src/go.chromium.org/tast/core/testing#Test

suzmue commented 1 year ago

The link for the public symbol, correctly links to the public documentaion at https://chromium.googlesource.com/chromiumos/platform/tast/+/15a9a0c3c67a/src/go.chromium.org/tast/core/testing/test.go#21: image

The links for the internal package testing and symbol Test result in errors: image https://pkg.go.dev/go.chromium.org/tast/core/internal/testing#Test: image

The link should have gone to the documentation at https://pkg.go.dev/chromium.googlesource.com/chromiumos/platform/tast.git@v0.0.0-20230519210337-15a9a0c3c67a/src/go.chromium.org/tast/core/internal/testing#Test