The compileProto.sh script compiles all .proto files in the proto/ directory into Go code. It automatically discovers proto files, generates import mappings for cross-references, and outputs the generated code to bot/proto/ with each proto file in its own package to avoid type conflicts.
For more information on Protocol Buffers in Go, see the official Go tutorial.
requests.go provides an easy to use sendRequest() to which you can directly pass your message, and it will send it and wait for a response.
To make this work, we use a code-generated wrapMessage function (see wrap_message_gen.go).
How to update the wrapper:
go generate wrap_message_gen.go
This will automatically regenerate the wrapper for all supported message types.
See exampleGetCommunities() for a usage example.