How to avoid duplication of protobuf and generated code

914 views Asked by At

Is there any chance to avoid code duplication on Go in .proto and .go files when using gRPC?

We need to store both two versions of the code - generated and source files: https://github.com/cqfn/degitx/blob/master/proto/hook.proto https://github.com/cqfn/degitx/blob/master/proto/go/degitxpb/hook.pb.go

On Java everything is easy - you have abstract classes and do not store them in repo. You simply do implementation of it. And on Go this looks to be a problem that causes a code duplication. Has someone solved it?

0

There are 0 answers