This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

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