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

Commit ad820b0

Browse files
authored
update Finish docs for Go1.14+ (#556)
1 parent bb5fd5e commit ad820b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gomock/controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ type Controller struct {
123123
// Controller.
124124
//
125125
// New in go1.14+, if you are passing a *testing.T into this function you no
126-
// longer need to call ctrl.Finish() in your test methods
126+
// longer need to call ctrl.Finish() in your test methods.
127127
func NewController(t TestReporter) *Controller {
128128
h, ok := t.(TestHelper)
129129
if !ok {
@@ -259,6 +259,9 @@ func (ctrl *Controller) Call(receiver interface{}, method string, args ...interf
259259
// Finish checks to see if all the methods that were expected to be called
260260
// were called. It should be invoked for each Controller. It is not idempotent
261261
// and therefore can only be invoked once.
262+
//
263+
// New in go1.14+, if you are passing a *testing.T into NewController function you no
264+
// longer need to call ctrl.Finish() in your test methods.
262265
func (ctrl *Controller) Finish() {
263266
// If we're currently panicking, probably because this is a deferred call.
264267
// This must be recovered in the deferred function.

0 commit comments

Comments
 (0)