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

Commit 11d9cab

Browse files
authored
fix readme docs on removing Finish calls (#461)
This feature has not yet been released so users need to pull @master if they would like to enable it for now.
1 parent 8734ec5 commit 11d9cab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ func TestFoo(t *testing.T) {
141141
}
142142
```
143143

144-
In Go versions 1.14+, if you pass a *testing.T into `gomock.NewController(t)`
145-
you no longer need to call `ctrl.Finish()`.
144+
If you are using a Go version of 1.14+, a mockgen version of 1.5.0+, and are
145+
passing a *testing.T into `gomock.NewController(t)` you no longer need to call
146+
`ctrl.Finish()` explicitly. It will be called for you automatically from a self
147+
registered [Cleanup](https://pkg.go.dev/testing?tab=doc#T.Cleanup) function.
146148

147149
Building Stubs
148150
--------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy