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 21 · May 18 – 24, 2026

x/tools/go/analysis/vet: export cmd/vet and cmd/fix analyzer suites

Worth knowingtooling

What changed
The vet and fix commands now expose their analyzer suites through new packages x/tools/go/analysis/vet and x/tools/go/analysis/fix.
Production impact
The source does not say.
Try it
Import golang.org/x/tools/go/analysis/vet and inspect vet.Suite to see the analyzers used by go vet.
Source
github.com/golang/go/issues/35487

Understand it, then run it

The go vet command runs a set of static‑analysis checks on Go code. Before Go 1.27 those checks were only defined inside the go vet binary, so a developer who wanted to reuse them had to copy the list of checks from the source. Starting with Go 1.27 the list of checks that go vet runs is exported in a new package, x/tools/go/analysis/vet. The package declares a variable called Suite that holds the slice of *analysis.Analyzer values used by go vet. A similar export exists for the go fix command in x/tools/go/analysis/fix.

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