Go version

go version go1.25rc1 linux/amd64

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/usr/local/google/home/mpratt/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/usr/local/google/home/mpratt/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build348834898=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/tmp/go/1.25rc1/go/src/go.mod'
GOMODCACHE='/usr/local/google/home/mpratt/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/usr/local/google/home/mpratt/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/tmp/go/1.25rc1/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='on'
GOTELEMETRYDIR='/usr/local/google/home/mpratt/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/tmp/go/1.25rc1/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25rc1'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

  1. Run go doc -http runtime from $GOROOT/src.
  2. Search the local pkgsite UI for "runtime".

What did you see happen?

Package "runtime" is listed twice in the search results. Note that both results link to the same place (/runtime).

A second minor issue is that only two of the results say "standard library" even though they are all in the standard library.

Image

What did you expect to see?

If go doc -http runtime is run outside of $GOROOT (e.g., from /), then runtime is only listed once, and every result says "standard library".

Image

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: cagedmantis

@golang/pkgsite

Comment From: ansaba

cc: @matloob

Comment From: gopherbot

Change https://go.dev/cl/687918 mentions this issue: cmd/internal/pkgsite: improve godoc mode search in GOROOT

Comment From: gopherbot

Change https://go.dev/cl/687976 mentions this issue: cmd/internal/pkgsite: increase x/pkgsite dependency to CL 687918

Comment From: gopherbot

Change https://go.dev/cl/687997 mentions this issue: cmd/internal/doc: upgrade godoc pkgsite to 01b046e