Currently we generated the set of known imports up front and embed them in puku to check at runtime. Ideally we'd figure this out from the configured go toolchain for the repo we're working in:
- Query the go plugin config to get the configured go tool
- If the configured go tool is a build target, build that target first
- Run
go env goroot to determine the sdk root
- Walk the packages building up a list of known import paths in a similar way to https://github.com/please-build/puku/pull/86/files#diff-f2c1015540a78e5b02bfd9676b75655150160783c03ca98c5f3d57c2d719a705R2