Sign in

Radar · Go · Archive · Week 19 · May 5 – 11, 2025

Inspector Cursor addition

Worth knowingtooling

What changed
The x/tools/go/ast/inspector package now includes a Cursor type that allows partial and multi‑level traversals of ASTs.
Production impact
The source does not say.
Try it
Import golang.org/x/tools/go/ast/inspector and use Cursor to iterate over a subset of nodes in a package.
Source
github.com/golang/go/issues/70859

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