-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/doc: match major module versions greater than 1 without needing a /vN suffix #41501
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
Comments
I will file more issues as I find them. I was just wondering if there was a larger meta-issue I had missed. To be clear, I haven't found other problems yet. It might all be working fine. |
I'm really surprised that noone has spotted this before. I assume this is a mix of not enough people knowing how to use I agree this needs a fix. At first glance it doesn't sound too complex, so perhaps it's a good first issue for someone wanting to get into In terms of a fix, perhaps we can use the package name for the lookup. That way, |
@mvdan, I like the idea of using the |
Sorry, what do you mean? Reading or parsing source files seems strictly more expensive than just opening the files. As far as I know, |
Sorry, s/reading/listing/. I think |
Simply using the last component of the package path, with a heuristic to remove |
Is something going to happen here for 1.17? Thanks. |
Change https://go.dev/cl/457195 mentions this issue: |
What version of Go are you using (
go version
)?I'm using Go 1.15, but I confirmed that none of the behavior I describe below is any different as of
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?N/A
What did you do?
I have a module which uses
github.com/go-chi/chi/v4
as a dependency. Thego.mod
contains(And it doesn't involve any other module or package named
chi
.)Inside this module, I was trying to use
go doc
to review some documentation for this dependency.What did you expect to see?
I should be able to use the name
chi
to call up package docs forgithub.com/go-chi/chi/v4
:What did you see instead?
The name
chi
is not enough to getgo doc
to bring up package docs forgithub.com/go-chi/chi/v4
. I need to refer to it aschi/v4
:By the way, is there some other issue tracking more general
go doc
improvements to better work with modules? I notice thatgo help doc
only mentionsGOPATH
, not modules, so I suspect that there might be more work required in this area.The text was updated successfully, but these errors were encountered: