Find unused go.mod requirements
ProprietaryFind direct require directives in go.mod that no package in the module imports. A direct requirement is only justified by a direct import, so these are candidates go mod tidy would remove or demote to // indirect. They are reported rather than removed because deciding whether a module is still needed transitively requires the module graph, which is not available offline.
org. openrewrite. golang. migration. FindUnusedGoModRequiresmod run . --recipe= org. openrewrite. golang. migration. FindUnusedGoModRequiresInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.