← All recipes
Moderne licensed

Swap github.com/golang/mock imports to go.uber.org/mock

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

Repoint every github.com/golang/mock import at go.uber.org/mock, which covers gomock, mockgen and mockgen/model. The fork's API is a superset of the original's, so call sites are unchanged; only the import path and its type attribution move.

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

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

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