From 1f4e3c2373a100cb94eb88a1e96d655c67bfd949 Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Fri, 15 Sep 2023 16:01:55 -0700 Subject: [PATCH] Undo deprecation of Controller.Finish() We're about to release a new version, and we need to reach some more consensus on this decision. Undoing this deprecation for the time being for v0.3.0 release. Ref: https://github.com/uber-go/mock/discussions/84. --- gomock/controller.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/gomock/controller.go b/gomock/controller.go index 943828e..6846d0d 100644 --- a/gomock/controller.go +++ b/gomock/controller.go @@ -236,9 +236,6 @@ func (ctrl *Controller) Call(receiver any, method string, args ...any) []any { // Finish checks to see if all the methods that were expected to be called were called. // It is not idempotent and therefore can only be invoked once. -// -// Deprecated: Calling this function in test methods is not required starting from Go 1.14. -// It will be called automatically from a self registered [testing.T.Cleanup] function. func (ctrl *Controller) Finish() { // If we're currently panicking, probably because this is a deferred call. // This must be recovered in the deferred function.