Open
Description
This is a follow up to #29202. In that issue, we added dynamic support for tracking multiple GOOS/GOARCH combinations, based on the set of open files. (e.g. if you open foo_windows.go
, gopls will create a new View with GOOS=windows
).
In some cases, it may be desirable for users to explicitly configure these builds, for example if they know a priori that they are targeting several ports, or sets of build tags. We should consider supporting this, for example via configuration like so:
"builds": [{
"env": ["GOOS=windows", "GOWORK=off"],
"flags": ["-tags", "example"]
}, {
// another build...
}]