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 3 · Jan 12 – 18, 2026

Expose “no return” API in x/tools/go

Worth knowingecosystem

What changed
The proposal is accepted to expose the results of “no return” analysis from the x/tools CFG packages, adding APIs in cfg, ctrlflow, and ssa that allow callers to query or set the “no return” property.
Production impact
The source does not say.
Try it
Clone golang.org/x/tools, import golang.org/x/tools/go/cfg, and call cfg.NoReturn() on a CFG you build to see if the function can return.
Source
github.com/golang/go/issues/76161

Understand it, then run it

The Go tools can now tell you when a function will never return. Previously you had to dig into the internals of the tools to find this out. Now the packages cfg, ctrlflow, and ssa expose a simple method called NoReturn. You can ask a control‑flow graph if it can return, or tell the SSA builder that a named function never returns, and the tools will use that information automatically.

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