Remove unused go.mod requirements
ProprietaryRemove require directives that go mod tidy would drop, restricted to what can be proven unused from the offline resolution: modules absent from the resolved build list and stray self-references. A require present in the build list is kept even when it is neither imported nor reachable through the recorded module-graph edges, since that graph is pruned and a still-needed test-closure or build-tag-gated dependency can be unreachable in it. Uses the resolved build list attached at parse time; a no-op when that resolution did not run.
org. openrewrite. golang. migration. RemoveUnusedGoModRequiresmod run . --recipe= org. openrewrite. golang. migration. RemoveUnusedGoModRequiresInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.