We have a go module we use with lots of packages in it.
e.g.
go list github.com/myco/bigmodule/...
github.com/myco/bigmodule
github.com/myco/bigmodule/pkg1
github.com/myco/bigmodule/pkg2
github.com/myco/bigmodule/suspkg
github.com/myco/bigmodule/pkg4
In our case that list is about 50 packages long. There is a package there that is problematic and we want to search over all our repos for uses of that particular package.
I can do go list -m all
to see if a repo is using the big module or not.
But I need to find out if the repo is using a specific package.
Ie. is this repo using this package:
github.com/myco/bigmodule/suspkg
I am hoping for a way that does not involve searching the entire source tree.
Is there a way go list can return the specific packages in use?