Order imports

Proprietary

Sort import lines into stdlib / third-party / local groups. Within each group, entries are alphabetized; non-empty groups are separated by a blank line. Mirrors goimports -w. Local detection uses the sibling go.mod's module path.

org.openrewrite.golang.OrderImports
mod run . --recipe=org.openrewrite.golang.OrderImports

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.