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/go: add support for "contains:" patterns to go list #26718

Open
matloob opened this issue Jul 31, 2018 · 0 comments

Comments

Projects
None yet
4 participants
@matloob
Copy link
Contributor

commented Jul 31, 2018

cc @rsc @bcmills @suzmue @ianthehat

go/packages.Load allows users to supply contains: as a pattern argument. All other patterns supplied to Load are accepted by go list and it would be helpful if contains: could be also. That would allow go/packages.Load to always make a single go list call.

go list contains: would list the packages containing the given file. This is an operation that tools commonly need, and have approximated in the past by determining the directory of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.