-
Notifications
You must be signed in to change notification settings - Fork 24
Description
We are working on the Go Wechaty recently, so we will need to support the Go version of our GRPC stubs.
The generating part will be very similar to the TypeScript & Python version that we are already supported. see: @chatie/grpc@NPM & chatie-grpc@PyPI
However, there's a difference between the Go and TypeScript/Python: we need to store the generated Go stub source code in our repository, instead of published to a centralized package manager site.
This is because the designers of the Go do not like a central package manager, which will cause many problems. See: Using Go Modules
So let's design the Go support for our chatie/grpc, I believe it should:
- The go module should share the same proto buffer definition files from
chatie/grpcrepo, which means it should be put into the same DevOps process of our repo here. - The go grpc generator script can be put at
scripts/generate-stub-go.sh, like the Pythonscripts/generate-stub-py.shas well. - The require path of our
chatie-grpcGo module should be:github.com/chatie/grpc/go/ - We should add a unit test to make sure the generated go stub version is matching our proto but file version.
This is just my initial version of the design, comments and suggestions are welcome, please feel free to start a discussion under this issue.