From b666070a33f7d30d1be4ad929f3648247faf42fd Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Sun, 26 Jul 2020 08:14:04 -0600 Subject: [PATCH] fix readme docs on removing Finish calls This feature has not yet been released so users need to pull @master if they would like to enable it for now. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 897f34df..eff0a467 100644 --- a/README.md +++ b/README.md @@ -141,8 +141,10 @@ func TestFoo(t *testing.T) { } ``` -In Go versions 1.14+, if you pass a *testing.T into `gomock.NewController(t)` -you no longer need to call `ctrl.Finish()`. +If you are using a Go version of 1.14+, a mockgen version of 1.5.0+, and are +passing a *testing.T into `gomock.NewController(t)` you no longer need to call +`ctrl.Finish()` explicitly. It will be called for you automatically from a self +registered [Cleanup](https://pkg.go.dev/testing?tab=doc#T.Cleanup) function. Building Stubs --------------