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

proposal: x/tools/go/packages: add modinfo.ModulePublic to packages.Package #35921

a8m opened this issue Dec 1, 2019 · 1 comment


Copy link

@a8m a8m commented Dec 1, 2019

Currently, packages.Load returns a packages.Package object that contains useful information from the go list API. However, sometimes the module information for the requested package is needed as well.

My proposal is basically to add the modinfo.ModulePublic info from go list to this package.

Similar to go list, if the package is not part of a module or it's provided by the Overlay API, Package.Module will be nil.

Let me know what do you think about this and I'll submit my CL for the proposal.

@gopherbot gopherbot added this to the Proposal milestone Dec 1, 2019
@gopherbot gopherbot added the Proposal label Dec 1, 2019

This comment has been minimized.

Copy link

@zikaeroh zikaeroh commented Dec 1, 2019

This would probably make #35563 much simpler to implement.

@rsc rsc changed the title proposal: x/tools/go/packages add modinfo.ModulePublic to packages.Package proposal: x/tools/go/packages: add modinfo.ModulePublic to packages.Package Dec 4, 2019
@rsc rsc added this to Incoming in Proposals Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.