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

Add an option to call gofmt or alternative script just after writing the generated file #49

Open moul opened 7 years ago

moul commented 7 years ago

This is a bonus, is as we can easily do it from a command just after calling protoc,

Hiwever it allows to ensure every generated go files are formatted and checked for syntax error even if the script fails on the nth file in a batch

vtolstov commented 3 years ago

this is really simple, like this: https://gist.github.com/vtolstov/c9327a3ef23313891bb050163b3df8ea