I don't know of anything that does those rewrites (and haven't looked), but
it looks like gofmt -s could support it by extending this type-switch:
https://cs.opensource.google/go/go/+/master:src/cmd/gofmt/simplify.go;l=16-103;drc=9b89c380208ea2e85985ee6bf2b1d684274dfa1d
I like the idea of an autom
Go 1.22 contains some cool features which will allow us to write simpler
code.
Would it be possible for gofmt -s to help us do transformations which clean
up old code such as
for i := 0; i < n; i++ -> for i := range n
removing x := x assignments inside range loops
or updating code to use the