錯(cuò)誤告訴我這個(gè)我已經(jīng)下載了那些包。仍然顯示錯(cuò)誤 Please install protoc first and than rerun the command$ kit generate service notifactor -t grpc --dmwtime="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"
1 回答

當(dāng)年話下
TA貢獻(xiàn)1890條經(jīng)驗(yàn) 獲得超9個(gè)贊
來(lái)自go-kit 來(lái)源:
一起使用 gRPC 和 go-kit 非常簡(jiǎn)單。
首先,使用 protobuf3 定義您的服務(wù)。這在 gRPC 文檔中有解釋。有關(guān)示例,請(qǐng)參見(jiàn) add.proto。確保原型定義與您服務(wù)的 go-kit(接口)定義相匹配。
接下來(lái),獲取 protoc 編譯器。
您可以從 protobuf 發(fā)布頁(yè)面下載預(yù)編譯的二進(jìn)制文件。您將解壓一個(gè)名為 protoc3 的文件夾,其中包含一個(gè)包含可執(zhí)行文件的子目錄 bin。將該可執(zhí)行文件移動(dòng)到您的 $PATH 中的某個(gè)位置,您就可以開(kāi)始了!
所以只要確保 protoc 在你的 PATH env var 中。
- 1 回答
- 0 關(guān)注
- 126 瀏覽
添加回答
舉報(bào)
0/150
提交
取消