Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to change which type to iterate over in order to create files #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pmoroney
Copy link
Contributor

I needed to generate a file per message as well as a single file with access to all of the AST.
So I added a type flag that you can pass the following options:
message: Generate a file per message definition, allows you to create files like {{.Message.Name}}.go.tmpl
service: Generate a file per service definition. This was the previous behavior and is now the default.
file: Generate a file per .proto file. This allows you to generate per file templates if those proto files have multiple service definitions.
none: Generates a single file. This gives you access to .Files which is a slice of all the .File descriptors.

@moul
Copy link
Owner

moul commented Jan 17, 2018

Hi @pmoroney,

Can you add an example in the examples directory ?
It will be easier to discover the flag features and that example can be used as kind of integration test

Thank you 😊

@pmoroney
Copy link
Contributor Author

Thanks for your patience, I will get to this as soon as I can :)

@pmoroney pmoroney requested a review from moul as a code owner September 1, 2020 08:11
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 Ready for Review Pull Request is not reviewed yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants