Sign in

Radar · Go · Archive · Week 9 · Feb 24 – Mar 2, 2025

cmd/go: add `work` package pattern matching all packages in work modules

Worth knowingtooling

What changed
A new meta‑pattern work was added to the go command to match all packages in work modules.
Production impact
The source does not say.
Try it
Run go test work/... in a workspace.
Source
github.com/golang/go/issues/71294

Understand it, then run it

The go command can take *package patterns* to tell it which packages to build, test, or install. Existing patterns include all, std, cmd, and tool. A new pattern called work was added to match every package that belongs to the current work (or workspace) modules. This lets you run a single command to build or test all of those packages, instead of having to list each one or use a long relative path pattern.

Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed