goprotoc
goprotoc copied to clipboard
Plugins Usage Example
The plugins package has some decent documentation, but I can't tell how it's actually intended to be used. Could you create an example, perhaps in plugins/README.md?
As an idea, what if I wanted to codegen a copy of the structs created by protoc-gen-go, but with different struct tags? How would that look? I get a little taste of it from the docs but I feel like I'm missing a lot of context.
@tooolbox, what kind of example are hoping to see? There is a high-level on in the package Go doc already: https://godoc.org/github.com/jhump/goprotoc/plugins#hdr-Interface_for_Protoc_Plugins
Do you mean like a fully-functioning plugin as an example, that also demonstrates interacting with the request and response (and maybe even using the GoNames type)?
Do you mean like a fully-functioning plugin as an example, that also demonstrates interacting with the request and response (and maybe even using the GoNames type)?
Yes, exactly. In the example:
// Process req, generate code to resp
It's not clear how to do this from reading the code, so showing how you might do this would be awesome.