You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 27, 2023. It is now read-only.
After #621 it is possible to generate a mock for interface with a generic type. But it seems that currently mockgen can not generate a mock for interfaces whose generic type is used in the method return value.
How this feature would be used.
After #621 it is possible to generate a mock for interface with a generic type. But it seems that currently
mockgen
can not generate a mock for interfaces whose generic type is used in the method return value.Take the following code snippet as an example
If the
Children
method returns([]PathReader[T], error)
, the mockgen will throw an error likeOtherwise, if we change the return type to
([]any, error)
, the mockgen will work as expected.Why the feature is needed
This feature can help people test generic interfaces with the generic return types.
The text was updated successfully, but these errors were encountered: