go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/protoc-gen-go
go install github.com/golang/protobuf/protoc-gen-go
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0rc2/protoc-3.7.0-rc-2-linux-x86_64.zip
# Unzip
unzip protoc-3.7.0-rc-2-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
sudo mv protoc3/include/* /usr/local/include/
- Dot means same directory of proto file
protoc folder_name/file_name.proto --go_out=plugins=grpc:.
example: protoc proto/helloworld.proto --go_out=plugins=grpc:.
protoc folder_name/file_name.proto --go_out=plugins=grpc:/directory_name
example: protoc proto/helloworld.proto --go_out=plugins=grpc:/proto
go run main.go