We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Like #965, I bumped into a need to safely access (mock.Mock).Calls today, but I wanted the calls rather than the length.
I think either a method to copy the Calls and return them:
Calls
// GetCalls returns a copy of the current Calls array. func (m *Mock) GetCalls() []*Call
Or a high order method to safely access the Calls slice:
func (m *Mock) CallsFn(f ([]*Call)) { m.mutex.Lock() defer m.mutex.Unlock() f(m.Calls) }
The text was updated successfully, but these errors were encountered:
Related to #944
Sorry, something went wrong.
No branches or pull requests
Like #965, I bumped into a need to safely access (mock.Mock).Calls today, but I wanted the calls rather than the length.
I think either a method to copy the
Calls
and return them:Or a high order method to safely access the
Calls
slice:The text was updated successfully, but these errors were encountered: