api - GoKit和生成微服务安装协议(protocol)报错

标签 api go

错误告诉我这个

  1. I already downloaded those packages.
  2. 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/

相关文章:

c++ - 获取窗口控件的API方法

api - API 和 IDL 的区别

go - 获取 labix.org/v2/mgo 错误远程服务器意外关闭连接

Golang 非阻塞缓冲区

Go lang, channel 处理顺序

go - falcore 热重启不会重新加载主代码

java - 通过 Java API 的 ACH 信用

node.js - Loopback API 包括未按预期工作的过滤器

android - 是否可以从 linux 层上运行的任何脚本/程序访问 Android API?

go - 如何将 nil 接口(interface)转换为 nil 其他接口(interface)