This repository is for practicing grpc with go language.
-
Go, any one of the three latest major releases of Go.
For installation instructions, see Go’s Getting Started guide.
-
Protocol buffer compiler, protoc, version 3.
For installation instructions, see Protocol Buffer Compiler Installation.
-
Go plugins for the protocol compiler:
- Install the protocol compiler plugins for Go using the following commands:
$ go install google.golang.org/protobuf/cmd/[email protected] $ go install google.golang.org/grpc/cmd/[email protected]
- Update your PATH so that the protoc compiler can find the plugins:
$ export PATH="$PATH:$(go env GOPATH)/bin"
$ protoc --go_out=[output file path] --go_opt=paths=source_relative \
--go-grpc_out=[output file path] --go-grpc_opt=paths=source_relative \
[proto file path]