Open Ralph7C2 opened 9 months ago
If an interface method or function uses a generic type with a specified type parameter, like:
type SomeInterface interface { Do(o Optional[pkg.SomeType]) }
The generated file will use Optional[pkg.SomeType], but not import pkg.
Optional[pkg.SomeType]
pkg
While there is a lot more work to fully support generic interfaces, this would improve interfaces that handle other generic types.
I've created a PR that fixes this: https://github.com/maxbrunsfeld/counterfeiter/pull/258
If an interface method or function uses a generic type with a specified type parameter, like:
The generated file will use
Optional[pkg.SomeType]
, but not importpkg
.While there is a lot more work to fully support generic interfaces, this would improve interfaces that handle other generic types.
I've created a PR that fixes this: https://github.com/maxbrunsfeld/counterfeiter/pull/258