It also will then try to call the mock.FooFunc(ctx, _) which is also invalid.
What the desired result is to have any _ parameters ignore in the callInfo initialization stage (_: _, is invalid) and to replace the _ in the FooFunc call with a nil.
If this is to support it for other types too, it may get more complex when trying to assign it to the default value of the incoming type.
When a parameter is
_ *FooStruct
then the generation of the mock creates invalidcallInfo
struct.Take the example of some gRPC service parameters that could look like:
This will generate a
callInfo
that looks like:It also will then try to call the
mock.FooFunc(ctx, _)
which is also invalid.What the desired result is to have any
_
parameters ignore in thecallInfo
initialization stage (_: _,
is invalid) and to replace the_
in the FooFunc call with anil
.If this is to support it for other types too, it may get more complex when trying to assign it to the default value of the incoming type.