Skip to content
New issue

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

mock: remove unnecessary fmt.Sprintf in assert.Fail #1673

Conversation

alexandear
Copy link
Contributor

Summary

The PR simplifies implementations of AssertNumberOfCalls, AssertCalled, AssertNotCalled functions by removing redundant fmt.Sprintf.

Changes

Remove fmt.Sprintf call inside assert.Fail.

Motivation

assert.Fail already formats msg with arguments, no need to add fmt.Sprintf, see it's declaration:

func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{})

@alexandear alexandear closed this Nov 24, 2024
@ccoVeille
Copy link
Contributor

Why closing? Inactivity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants