From 060e39b60a27e9a26dc03988a8b2b98a29b7cf33 Mon Sep 17 00:00:00 2001 From: Lazizbek Ergashev Date: Mon, 31 Aug 2026 19:09:32 +0500 Subject: [PATCH] mock: document Call.Times behavior when called with zero --- mock/mock.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mock/mock.go b/mock/mock.go index 746151e1b..46e0ca4dc 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -141,7 +141,8 @@ func (c *Call) Twice() *Call { } // Times indicates that the mock should only return the indicated number -// of times. +// of times. Calling with i=0 resets the call to the default behavior, +// return at least once. To return no times omit any call to [Mock.On]. // // Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Times(5) func (c *Call) Times(i int) *Call {