use go list
to obtain the standard library's package mapping
#11910
Labels
backend: Go
Go backend-related issues
The experiment Go backend currently manually scans the standard library to find packages. The
go list
command already provides this information in a standard way without having to deal with filesystem specifics.The
grok_goroot
rule should invokego list -json std
(via a GoToolRunRequest once #11909 is implemented) and then use the output to construct a mapping of import path to package file.The JSON output looks similar to:
The
ImportPath
andTarget
attributes should then be used to construct the mapping of import path to package file.The text was updated successfully, but these errors were encountered: