proposal: x/tools/go/packages: support a "dir=" query #42802
We can currently query
A new query "dir=path/to/package" matches the package or packages in the directory path/to/package. For example "dir=~/go/src/fmt" might return the packages "fmt" and "fmt [fmt.test]".
Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
I've refactored my recursive scan, keying on the package import path instead of the package dir, which means the directory lookup is only required at the start to derive the top-level package import path. Based on your comment, I've realized that I could specify the package directory in
The somewhat vague description in the GoDoc "Load passes most patterns directly to the underlying build tool..." did not make it obvious to me that we could use a
As an alternative to the above proposal, perhaps the GoDoc can be enhanced to mention