当前位置:网站首页>Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution

Go language uses the thrift protocol to realize the client and service end reports not enough arguments in call to oprot Writemessagebegin error resolution

2022-07-06 16:53:00 Flower dog fdog

Normal procedure :

install golang Of Thrift package :
go get git.apache.org/thrift.git/lib/go/thrift

install Thrift Of IDL Compiler tools :
http://www.apache.org/dyn/closer.cgi?path=/thrift/0.10.0/thrift-0.10.0.exe

An error will be reported when compiling the client , appear not enough arguments in call to oprot.WriteMessageBegin Error of , This is because the version of the local generation protocol is the same as go get git.apache.org/thrift.git/lib/go/thrift Different versions of the library are downloaded .

You can use it first Thrift Of IDL The compiler generates the protocol , Then enter git.apache.org/thrift.git Catalog , perform git checkout 0.10.0 Then recompile it .0.10.0 Is for IDL The compiler generates the protocol .

原网站

版权声明
本文为[Flower dog fdog]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131313332637.html