Remove redundant defer ctrl.Finish()

Proprietary

Remove defer ctrl.Finish() where the controller was built by gomock.NewController from a *testing.T, *testing.B, *testing.F or testing.TB. NewController registers the finish through Cleanup for any such reporter, so the deferred call only repeats it.

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

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