1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > go语言使用thrift协议实现客户端和服务端报not enough arguments in call to op

go语言使用thrift协议实现客户端和服务端报not enough arguments in call to op

时间:2023-05-26 19:06:51

相关推荐

go语言使用thrift协议实现客户端和服务端报not enough arguments in call to op

正常步骤:

安装golang的Thrift包:

go get /thrift.git/lib/go/thrift

安装 Thrift 的 IDL 编译工具:

/dyn/closer.cgi?path=/thrift/0.10.0/thrift-0.10.0.exe

编译客户端的时候会报错,出现not enough arguments in call to oprot.WriteMessageBegin的错误,这是因为本地生成协议的版本是与 go get /thrift.git/lib/go/thrift 下载下来的库版本是不同导致的。

可以先使用 Thrift 的 IDL 编译工具生成协议,然后进入/thrift.git目录,执行git checkout 0.10.0 然后重新编译即可。0.10.0就是对于IDL编译工具生成协议。

go语言使用thrift协议实现客户端和服务端报not enough arguments in call to oprot.WriteMessageBegin错误解决方案

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。