go - Twirp 不适用于原型(prototype)

标签 go protocol-buffers proto twirp

我似乎无法正确安装 twirp 以使用 protobuf。

protoc --proto_path=$GOPATH/bin:. --twirp_out=. --go_out=. ./rpc/person/service.proto

是我在编译和创建我的 twirp 文件时尝试执行的命令,但是我收到以下错误:
protoc-gen-twirp:program not found or is not executable
--twirp_out: protoc-gen-twirp: Plugin failed with status code 1.

我的 .bashrc 已经为 Golang 提供了这两行:
export GOPATH=/home/carlosrueda/Documents/go
PATH=$PATH:/usr/local/bin/go/bin:$GOPATH

任何帮助解决这个问题将不胜感激,谢谢。

最佳答案

我通过在 .bashrc 的第二行末尾添加/bin 来解决此问题。 PATH=$PATH:/usr/local/bin/go/bin:$GOPATH/bin

关于go - Twirp 不适用于原型(prototype),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51366306/

相关文章:

java - 覆盖 Protocol Buffer 在将字段设置为 null 时抛出 NPE 的默认行为

c# - 通过网络传输 int

go - Protoc 不创建服务

python - 反序列化带有 header 和重复字段的流式 Protocol Buffer 消息

methods - Go:并发调用方法对我不起作用

json - Golang - 从 Twitch TV RESTful 服务解析 JSON 字符串数组

json - 在 Golang 中测试 JSON 帖子

gorilla session 无效 key 大小

go - 如何将 protoc-gen-go gzipped FileDescriptorProto 显示为纯文本?

c# - 将流转换为字节串