- 项目中安装 grpc
go get google.golang.org/grpc
- 安装 protoc
将相应软件下载下来, 然后将 bin 文件夹添加到 $PATH
- 安装
protoc-gen-go
go install google.golang.org/protobuf/cmd/protoc-gen-go
protoc-gen-go-grpc
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
protoc-gen-grpc-gateway
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
protoc-gen-swagger
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
- 安装
go-bindata
go install github.com/jteeuwen/go-bindata/...
go-bindata-assetfs
go install github.com/elazarl/go-bindata-assetfs/...
- 配置路径, install 的文件会安装在 GOPATH/bin配置到$PATH