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.
The text was updated successfully, but these errors were encountered: