What version of Go, VS Code & VS Code Go extension are you using?
Version Information
- Run
go version to get version of Go from the VS Code integrated terminal.
- go version go1.26.3 linux/amd64
- Run
gopls -v version to get version of Gopls from the VS Code integrated terminal.
- zsh: command not found: gopls
- Run
code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
- 1.123.2
3c631b164c239e7aeaaae7c626b46c527b361af2
x64
- Check your installed extensions to get the version of the VS Code Go extension
- Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools command.
Environment
GOBIN: undefined
toolsGopath:
gopath: /home/user/go
GOROOT: /usr/local/go
PATH: /home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/var/cfengine/bin:/usr/local/go/bin
Tools
go: /usr/local/go/bin/go: go version go1.26.3 linux/amd64
gotests: not installed
impl: not installed
goplay: not installed
dlv: not installed
gopls: /home/user/go/bin/gopls (version: v0.22.0 built with go: go1.26.3)
Go env
Workspace Folder (mygit): /home/user/repos/mygit
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='/home/user/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/user/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build825909314=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/mnt/build/repos/mygit/go.mod'
GOMODCACHE='/home/user/go/pkg/mod'
GONOPROXY='/home/user/repos/mygit/pkg/xxx'
GONOSUMDB='/home/user/repos/mygit/pkg/xxx'
GOOS='linux'
GOPATH='/home/user/go'
GOPRIVATE='/home/user/repos/mygit/pkg/xxx'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/user/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.26.3'
GOWORK=''
PKG_CONFIG='pkg-config'
Share the Go related settings you have added/edited
None
Describe the bug
When hovering mouse pointer over a private package in the VS editor, it suggests documentation link on pkg.go.dev.
Acting by suggestion from https://github.com/golang/vscode-go/wiki/settings#uidocumentationlinktarget and trying to set GOPRIVATE environment variable to github path for the private package or to the local filesystem path for it gives no change in hovering behavior.
I'm working inside a workspace and private package is located as ./pkg/xxx.
Expected fix would be at least to hide the link in order to not mislead with providing links to pkg.go.dev for local/private packages.
Ideally the link should point to the correct package location.
Steps to reproduce the behavior:
- Hover mouse pointer over a private package name in VS Code editor.
- Notice the documentation link points to pkg.go.dev.
Screenshots or recordings
N/A
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go versionto get version of Go from the VS Code integrated terminal.gopls -v versionto get version of Gopls from the VS Code integrated terminal.code -vorcode-insiders -vto get version of VS Code or VS Code Insiders.3c631b164c239e7aeaaae7c626b46c527b361af2
x64
Go: Locate Configured Go Toolscommand.Tools Configuration
Environment
GOBIN: undefined
toolsGopath:
gopath: /home/user/go
GOROOT: /usr/local/go
PATH: /home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/var/cfengine/bin:/usr/local/go/bin
Tools
Go env
Workspace Folder (mygit): /home/user/repos/mygit
Share the Go related settings you have added/edited
None
Describe the bug
When hovering mouse pointer over a private package in the VS editor, it suggests documentation link on pkg.go.dev.
Acting by suggestion from https://github.com/golang/vscode-go/wiki/settings#uidocumentationlinktarget and trying to set GOPRIVATE environment variable to github path for the private package or to the local filesystem path for it gives no change in hovering behavior.
I'm working inside a workspace and private package is located as ./pkg/xxx.
Expected fix would be at least to hide the link in order to not mislead with providing links to pkg.go.dev for local/private packages.
Ideally the link should point to the correct package location.
Steps to reproduce the behavior:
Screenshots or recordings
N/A