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 39 · Sep 22 – 28, 2025

x/tools/go/analysis/passes/modernize: publish

Worth knowingtooling

What changed
The modernize analyzer suite is moved to x/tools/go/analysis/passes/modernize and can now be used by go fix.
Production impact
The source does not say.
Try it
Run go fix -r modernize on a repository that contains modernize‑eligible code.
Source
github.com/golang/go/issues/75266

Understand it, then run it

The Go team moved a set of static‑analysis tools that suggest modern language or library features into a new package called x/tools/go/analysis/passes/modernize. These tools were previously hidden inside the editor server gopls. Now they are part of the public analysis framework and can be run by the go fix command. The change does not alter any language syntax; it only changes where the code lives and how it can be invoked.

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