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