go - Thrift Compiler(0.9.3) 生成 Thrift 包中未定义的函数 thrift.PrependError

标签 go compilation thrift

我使用thrift编译器(0.9.3)生成gen-go文件夹,同时编译器生成一个函数thrift.PrependError,在thrift 包(git.apache.org/thrift.git/lib/go/thrift)。

我应该使用 thrift 编译器 (0.9.2) 吗?

最佳答案

Thrift 0.9.3 中添加了 Prepend error,并存在于当前代码库中:

https://github.com/apache/thrift/blob/53dd39833a08ce33582e5ff31fa18bb4735d6731/lib/go/thrift/exception.go

https://github.com/apache/thrift/commit/527b6d9c86a7e5cde14cbb09a0e3103be0791c3a#diff-d28b48f0840fec65d4a9ece357194970R32

如果在您的本 map 书馆中找不到它,您需要更新您的本地(或销售)版本的 Thrift。

请记住,您的 thrift 生成器二进制文件(在 /usr/local/bin/thrift 中)可以是与您在 $GOPATH 中的包不同的版本。始终确保将两者一起更新。

关于go - Thrift Compiler(0.9.3) 生成 Thrift 包中未定义的函数 thrift.PrependError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39474687/

相关文章:

c++ - 为什么对于gcc 'UNIX'和 'unix'宏不是同一回事?

去旅游#10 : What is the use of that done channel in the crawler solution

java - Cassandra 使用 thrift 在 CQL3 中准备语句

docker - 如何在不运行的情况下从 docker build 复制结果

go - 如何在 Mac OS X 10.10 中设置 GOPATH

c++ - 视觉 C++ 2008;将库添加到编译过程?

Java "new String[-1]"通过编译。怎么来的?

java - 编译src中的所有文件?

ruby - 节俭 ruby

java - 使用 Apache Thrift 的服务多路复用