Point //go:generate mockgen at go.uber.org/mock

Proprietary

Rewrite github.com/golang/mock to go.uber.org/mock inside //go:generate directives, so go generate runs the maintained mockgen. Covers both the go run github.com/golang/mock/mockgen form and the vendored go run ./vendor/github.com/golang/mock/mockgen form.

org.openrewrite.golang.migration.UpdateMockgenGoGenerateDirectives
mod run . --recipe=org.openrewrite.golang.migration.UpdateMockgenGoGenerateDirectives

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.