golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.26k stars 608 forks source link

Support for Generics #635

Closed gurleensethi closed 2 years ago

gurleensethi commented 2 years ago

Requested feature Ability to create mocks when interfaces have generics used inside them.

Why the feature is needed When I try to generate mocks I get this error:

2022/04/15 18:38:12 Loading input failed: service/my_service.go:7:11: failed parsing returns: don't know how to parse type *ast.IndexExpr

Would appreciate this feature being supported, for now it makes the combination go1.8 and gomock unusable.

sodul commented 2 years ago

I think this is a duplicate of #621

codyoss commented 2 years ago

Closing as dupe as mentioned above.