Migrate golang.org/x/exp/constraints to cmp
Recipe ID
org.openrewrite.golang.migration.MigrateXExpConstraintsToStdlibArtifactgithub.com/moderneinc/recipes-goRewrite constraints.Ordered to cmp.Ordered, added to the standard library in Go 1.21. Integer, Float, Signed, Unsigned and Complex have no standard-library counterpart, so a file naming one of them keeps the x/exp import and is left for review.
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.MigrateXExpConstraintsToStdlibIf the recipe isn’t available locally, install it with:
mod config recipes go install github.com/moderneinc/recipes-go