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

cmd/doc: load packages with golang.org/x/tools/go/packages #34750

Open
jayconrod opened this issue Oct 7, 2019 · 0 comments
Open

cmd/doc: load packages with golang.org/x/tools/go/packages #34750

jayconrod opened this issue Oct 7, 2019 · 0 comments
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@jayconrod
Copy link
Contributor

cmd/doc currently uses go/build.Import to locate and import packages. It should use golang.org/x/tools/go/packages.

This may be a little complicated because cmd/doc supports a number of shorthand formats for specifying the package to display documentation for, so we may not have the full package path. However, go/build has limited support for modules, and we're considering deprecating it eventually. Using go/packages could also simplify cmd/doc, since it wouldn't need code for parsing Go source.

@jayconrod jayconrod added NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go Tools This label describes issues relating to any tools in the x/tools repository. labels Oct 7, 2019
@jayconrod jayconrod added this to the Unplanned milestone Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

1 participant