错误告诉我这个
- I already downloaded those packages.
- still show me the error Please install protoc first and than rerun the command
$ kit generate service notifactor -t grpc --dmw
time="2019-03-06T16:35:29+08:00" level=error msg="Please install protoc first and than rerun the command"
time="2019-03-06T16:35:29+08:00" level=info msg="Install proto3.\nhttps://github.com/google/protobuf/releases\nUpdate protoc Go bindings via\n> go get -u github.com/golang/protobuf/proto\n> go get -u github.com/golang/protobuf/protoc-gen-go\n\nSee also\nhttps://github.com/grpc/grpc-go/tree/master/examples"
最佳答案
来自go-kit source :
Using gRPC and go-kit together is very simple.
First, define your service using protobuf3. This is explained in gRPC documentation. See add.proto for an example. Make sure the proto definition matches your service's go-kit (interface) definition.
Next, get the protoc compiler.
You can download pre-compiled binaries from the protobuf release page. You will unzip a folder called protoc3 with a subdirectory bin containing an executable. Move that executable somewhere in your $PATH and you're good to go!
所以只要确保 protoc 在你的 PATH 环境变量中。
关于api - GoKit和生成微服务安装协议(protocol)报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55018899/