Skip to content

Commit

Permalink
Merge pull request #1569 from stretchr/mock-more-AnythingOfTypeArgume…
Browse files Browse the repository at this point in the history
…nt-alternatives

mock: document more alternatives to deprecated AnythingOfTypeArgument
  • Loading branch information
brackendawson authored Apr 23, 2024
2 parents f32ff5b + 8c324a0 commit 8d4dcbb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,15 @@ const (
// AnythingOfTypeArgument contains the type of an argument
// for use when type checking. Used in [Arguments.Diff] and [Arguments.Assert].
//
// Deprecated: this is an implementation detail that must not be used. Use [AnythingOfType] instead.
// Deprecated: this is an implementation detail that must not be used. Use the [AnythingOfType] constructor instead, example:
//
// m.On("Do", mock.AnythingOfType("string"))
//
// All explicit type declarations can be replaced with interface{} as is expected by [Mock.On], example:
//
// func anyString interface{} {
// return mock.AnythingOfType("string")
// }
type AnythingOfTypeArgument = anythingOfTypeArgument

// anythingOfTypeArgument is a string that contains the type of an argument
Expand Down

0 comments on commit 8d4dcbb

Please sign in to comment.