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

Commit

Permalink
fix readme docs on removing Finish calls (#461)
Browse files Browse the repository at this point in the history
This feature has not yet been released so users need to pull
@master if they would like to enable it for now.
  • Loading branch information
codyoss authored Jul 31, 2020
1 parent 8734ec5 commit 11d9cab
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 11d9cab

Please sign in to comment.