Hello, I tried to generate a Go code from simple Thrift file and I noticed that there are some difference in the code generated by Apache Thrift and ThriftGo. The code generated by ThriftGo is missing some lines that handle exception. It happen to void function that throw exception.
Hello, I tried to generate a Go code from simple Thrift file and I noticed that there are some difference in the code generated by Apache Thrift and ThriftGo. The code generated by ThriftGo is missing some lines that handle exception. It happen to
void
function that throw exception.This is the thrift file:
Then using Apache Thrift (v0.13.0) the generated Go code is:
But, when using ThriftGo (v0.3.1) the generated code is:
As you can see, the
switch
block that handle the exception is missing.I'm not familiar with the ThriftGo, but I guess it is because in this template https://github.com/cloudwego/thriftgo/blob/main/generator/golang/templates/client.go#L96-L103 the throw exception will be generated if the function is not a
void
type.Thank you