From be42a820c4f5862ff44b4b9e65932aa1e0e6f5f8 Mon Sep 17 00:00:00 2001 From: Kensei Nakada <44139130+sanposhiho@users.noreply.github.com> Date: Fri, 14 May 2021 08:40:21 +0900 Subject: [PATCH] Fix: description about Finish --- gomock/controller.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gomock/controller.go b/gomock/controller.go index 3b656909..f054200d 100644 --- a/gomock/controller.go +++ b/gomock/controller.go @@ -123,7 +123,7 @@ type Controller struct { // Controller. // // New in go1.14+, if you are passing a *testing.T into this function you no -// longer need to call ctrl.Finish() in your test methods +// longer need to call ctrl.Finish() in your test methods. func NewController(t TestReporter) *Controller { h, ok := t.(TestHelper) if !ok { @@ -259,6 +259,9 @@ func (ctrl *Controller) Call(receiver interface{}, method string, args ...interf // Finish checks to see if all the methods that were expected to be called // were called. It should be invoked for each Controller. It is not idempotent // and therefore can only be invoked once. +// +// New in go1.14+, if you are passing a *testing.T into NewController function you no +// longer need to call ctrl.Finish() in your test methods. func (ctrl *Controller) Finish() { // If we're currently panicking, probably because this is a deferred call. // This must be recovered in the deferred function. 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