thrift-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [thrift] fishy commented on a change in pull request #2315: THRIFT-4914: Make TClient.Call to return the response meta
Date Wed, 17 Feb 2021 21:07:41 GMT

fishy commented on a change in pull request #2315:
URL: https://github.com/apache/thrift/pull/2315#discussion_r577943523



##########
File path: compiler/cpp/src/thrift/generate/t_go_generator.cc
##########
@@ -2091,8 +2108,11 @@ void t_go_generator::generate_service_client(t_service* tservice) {
       std::string resultName = tmp("_result");
       std::string resultType = publicize(method + "_result", true);
       f_types_ << indent() << "var " << resultName << " " <<
resultType << endl;
-      f_types_ << indent() << "if err = p.Client_().Call(ctx, \""
-        << method << "\", &" << argsName << ", &" <<
resultName << "); err != nil {" << endl;
+      f_types_ << indent() << "var meta thrift.ResponseMeta" << endl;
+      f_types_ << indent() << "meta, err = p.Client_().Call(ctx, \""
+        << method << "\", &" << argsName << ", &" <<
resultName << ")" << endl;
+      f_types_ << indent() << "p.SetLastResponseMeta_(meta)" << endl;
+      f_types_ << indent() << "if err != nil {" << endl;

Review comment:
       https://github.com/apache/thrift/pull/2332




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message