Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix readme docs on removing Finish calls #461

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down