我正在尝试使用 https://github.com/grpc-ecosystem/grpc-gateway但是当我尝试运行时protoc -I/usr/local/include -I. -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc,paths=source_relative:./ example/example.proto
错误 src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis:警告:目录不存在。
为了解决这个问题,我手动带来了必要的文件,但我觉得这是不必要的,有一种方法可以让它自动化,
我之前跑go get -u github.com/grpc-ecosystem/grpc-gateway/
但还是没办法
最佳答案
您尝试下载的原型(prototype)来自此模块
env GO111MODULE=on go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
关于go - 如何在不复制谷歌文件的情况下制作工作协议(protocol)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63621788/