Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Go module documentation link #292

Open
ash2k opened this issue Apr 19, 2023 · 0 comments
Open

Open Go module documentation link #292

ash2k opened this issue Apr 19, 2023 · 0 comments

Comments

@ash2k
Copy link

ash2k commented Apr 19, 2023

Hi! Feature request. When browsing sources of a Go module in GoLand, it'd be very useful to have a context menu item to open docs for that module.

Example.

Say I'm browsing ~/go/pkg/mod/github.com/redis/go-redis/extra/redisprometheus/v9@v9.0.2/collector.go. Docs for that package is at https://pkg.go.dev/github.com/redis/go-redis/extra/redisprometheus/v9.

Or ~/go/pkg/mod/github.com/prometheus/prometheus@v0.40.5/model/labels/labels.go. Docs are at https://pkg.go.dev/github.com/prometheus/prometheus@v0.40.5/model/labels.

The ~/go/pkg/mod path can be retrieved by running go env GOMODCACHE command:

go env GOMODCACHE
/Users/mike/go/pkg/mod

It probably depends on the Go SDK selected for the project (there may be multiple installed on the system). There may be a way to get it somehow via the IDE API, I have no idea.

p.s. Thanks for a very useful plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant