Closed jhayotte closed 7 years ago
I added a helper that wraps goType for this use case.
PS: I tried doing something a bit more elegant with {{$f | goType {{$f | goPackage}}}}
but the generator did not like {
as parameter. If you think it's doable and that's really more elegant, tell me.
This PR is a proposal to enhance protoc-gen-gotemplate on a specific point: Handle the statement import of Protobuffer in our generator. Thus we can share proto's definition and structure them better.
To make it work, I had to tweak
goType
in helpers.go. If you have a better idea do not hesitate to suggest it :)I wrote an example of import to show how it works.