With go version >= 1.20 installed (The g Go version manager recommended)...
git clone [email protected]:rmorison/protobuf-toolchain-template.git
make
./greeter_server/main &
./greeter_client/main
./greeter_client/main --name everybody
git clone [email protected]:rmorison/protobuf-toolchain-template.git
make PROTOC_ARCH=osx-aarch
./greeter_server/main &
./greeter_client/main
./greeter_client/main --name everybody
git clone [email protected]:rmorison/protobuf-toolchain-template.git
make PROTOC_ARCH=osx-x86_64
./greeter_server/main &
./greeter_client/main
./greeter_client/main --name everybody
- Replace
GO_PACKAGE
in Makefile with your package path. - Add your
.proto
files likeproto/myproto/myproto.proto
and setoption go_package
appropriately. (See helloworld.proto for example.) - Update
PROTO_FILES
with a list of paths to your.proto
files. - Replace
all
targets in Makefile with what you're building. [I like to construct CLI apps with Cobra, though this template does not take that approach as the client and server code comes from the grpc-go helloworld example].