cmd/go: provide a convenient way to iterate all packages in go.work workspace #50745
Labels
FeatureRequest
modules
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
go.work
makes it easier to work with multiple modules.Often users want to run tests or analysis for all packages in their workspace. For a single module case, this can be easily achieved by using
./...
pattern. Currently, however, there is no equivalent of./...
in workspace mode. So users need to run go commands from inside of each individual module, or supply the paths for each module directories listed ingo.work
. (e.g.go test -v $(go list -f '{{.Dir}}/...' -m | xargs)
).We need to figure out how to offer
./...
-equivalent behavior when working with `go.work.My personal preference is to reuse
./...
(VSCode Go uses./...
pattern to implement workspace-wide test, lint, coverage computation, etc).p.s. I noticed the issue about clarifying the meaning of
...
in module mode is still open #37227The text was updated successfully, but these errors were encountered: