← All recipes
Moderne licensed

Require go.uber.org/mock instead of github.com/golang/mock

Recipe IDorg.openrewrite.golang.migration.UpdateGolangMockDependencyArtifactgithub.com/moderneinc/recipes-go

Bring the go.mod require into line with what the source imports: repoint github.com/golang/mock at go.uber.org/mock v0.6.0 once nothing imports the archived module any more, and require both while a file still does. Does not sync go.sum, so a go mod tidy is still needed to complete resolution.

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.UpdateGolangMockDependency

If the recipe isn’t available locally, install it with:

mod config recipes go install github.com/moderneinc/recipes-go