Remove the golang.org/x/exp requirement once unused
Recipe ID
org.openrewrite.golang.migration.RemoveXExpDependencyArtifactgithub.com/moderneinc/recipes-goDrop the direct require golang.org/x/exp directive from go.mod once no source file needs it — either because nothing imports it any more, or because the migration moves every import that remains. x/exp holds far more than the packages these recipes cover, so an import of any other one keeps the requirement, as does an // indirect entry. Does not touch go.sum, so a go mod tidy is still needed.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.golang.migration.RemoveXExpDependencyIf the recipe isn’t available locally, install it with:
mod config recipes go install github.com/moderneinc/recipes-go