I noticed an issue about missing support for generics and figured i'd try to solve it
This PR adds support for generic interfaces by extending the template and analysis of an ast tree
What i did:
Bump Go version to 1.18 to add generics support in ast/ packages
Extend interfaces in some functions to not only reflect the name of the interfaces, but also it's type parameters
Added custom functions to template engine to generate type param declarations and references. To provide compatibility with non-generic code these functions return empty strings in no type params are present, so there is no difference for existing code. I figured this to be the easiest way as underlying gen-engine does not support generics (as far as i could tell, it does not have corresponding fields in structs and is based on go1.17)
Extended the template to use those functions and generate compilable Go code
Additional changes:
Added test cases for interfaces (tested that those failed on v3.0.10
I noticed an issue about missing support for generics and figured i'd try to solve it
This PR adds support for generic interfaces by extending the template and analysis of an ast tree
What i did:
Additional changes:
Closes #63