Radar · Go · Archive · Week 34 · Aug 18 – 24, 2025
x/tools/go/packages: add Postorder iterator
Worth knowingtooling
- What changed
- The proposal adds a
Postorderfunction that returns aniter.Seq[*Package]over packages in dependencies‑first order. - Production impact
- The source does not say.
- Try it
- In a Go program that imports
golang.org/x/tools/go/packages, callpackages.Postorder(pkgs)to iterate over loaded packages instead of usingpackages.Visit. - Source
- github.com/golang/go/issues/74875
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed