protoc-gen-go and go modules

12 views
Skip to first unread message

Amit Saha

unread,
May 9, 2021, 4:03:43 AM5/9/21
to grpc.io
Hi all, for folks who are generating Go code, how are you importing
them into your server and client? As far as I see it now, the protoc
command will not generate a go.mod file in the generated code which
means - you have to do it manually and then import them into your
server and client. That is, you will have three modules:

- One for server
- One for client
- One for the generated code

This seems to be the cleanest approach. During local development, we
will then use the "replace" directive for iteration.

I am keen to hear how it's being done by others in the community.

Thanks,
Amit.
Reply all
Reply to author
Forward
0 new messages