- Install the protobuf compiler https://grpc.io/docs/protoc-installation/
- Install the Go protobuf plugin and grpc plugin
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
- Generate protobuf files
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative *.proto
For how to build server and client code, see server.go and client.go