安装grpc插件


windows安装protoc

1. 下载需要的安装包:https://github.com/google/protobuf/releases
2. 将解压文件中的protoc.exe拷贝到c:windowssystem32中
3.go get -u github.com/golang/protobuf/protoc-gen-go

4.安装protoc-gen-go-grpc 插件
地址:https://github.com/grpc/grpc-go

下载成功后,进入grpc-gocmdprotoc-gen-go-grpc目录

执行go install 此时protoc-gen-go-grpc已经安装在gopath/bin 目录下了



protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative pkg/proto/usspb/uss.proto

原文地址:https://www.cnblogs.com/lajiao/p/15417701.html