moul / protoc-gen-gotemplate

:open_file_folder: generic protocol generator based on golang's text/template (grpc/protobuf)
https://manfred.life/protoc-gen-gotemplate
MIT License
438 stars 68 forks source link

get package name only for descriptor message typed #60

Closed jhayotte closed 7 years ago

jhayotte commented 7 years ago

This PR fixes an issue on my previous PR #58 : GetPackageTypeName must only be called when the type of FieldDescriptorProto is FieldDescriptorProto_TYPE_MESSAGE otherwise it panics.