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 70 forks source link

add helper getEnumValue #61

Closed jhayotte closed 7 years ago

jhayotte commented 7 years ago

This PR adds the method getEnumValue in our helpers. The goal is to have a quick and efficient way to loop through a chosen Enum described in a proto file. The filter is case-insensitive.

I provided a sample to illustrate what it does.

(PS) If you have a better name for this helper do not hesitate to propose.