gapic: refactor plugins to Go Protobuf v2 plugin API
Recently, the v2 of the Go Protobuf API was released, that included improvements to the protoc plugin API. We should upgrade and refactor the Go micro-generator to use google.golang.org/protobuf/compiler/protogen (godoc). This could significantly reduce the amount of hand-spun utility code in the Go micro-generator.
This would also probably mean significant changes to all three generators: gengapic, gencli, gensample.
Blog post about the new package for posterity.
I can attest that the new api is 🔥
@noahdietz Support for input on textpb format would also be super useful.
@odsod would you mind opening a separate issue fro a feature request please? This issue is a backlog item to migrate protobuf APIs in the protoc plugin implementations.