You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2013/08/16 15:27:00 UTC

git commit: THRIFT-2128: lib GO tests fail with funct ends without a return statement Client: go Patch: jfarrell

Updated Branches:
  refs/heads/master 102c600bb -> 87577ef00


THRIFT-2128: lib GO tests fail with funct ends without a return statement
Client: go
Patch: jfarrell

Fix issue with go tests failing in go1 in the process function.


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/87577ef0
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/87577ef0
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/87577ef0

Branch: refs/heads/master
Commit: 87577ef0015251c865a599f794a5ff1d5f9b35e9
Parents: 102c600
Author: jfarrell <jf...@apache.org>
Authored: Fri Aug 16 09:26:05 2013 -0400
Committer: jfarrell <jf...@apache.org>
Committed: Fri Aug 16 09:26:05 2013 -0400

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_go_generator.cc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/87577ef0/compiler/cpp/src/generate/t_go_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_go_generator.cc b/compiler/cpp/src/generate/t_go_generator.cc
index 288bfab..eecc836 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -2241,16 +2241,16 @@ void t_go_generator::generate_service_server(t_service* tservice)
                    indent() << "  if err != nil { return false, err }" << endl <<
                    indent() << "  if processor, ok := p.GetProcessorFunction(name); ok {" << endl <<
                    indent() << "    return processor.Process(seqId, iprot, oprot)" << endl <<
-                   indent() << "  } else {" << endl <<
-                   indent() << "    iprot.Skip(thrift.STRUCT)" << endl <<
-                   indent() << "    iprot.ReadMessageEnd()" << endl <<
-                   indent() << "    " << x << " := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, \"Unknown function \" + name)" << endl <<
-                   indent() << "    oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)" << endl <<
-                   indent() << "    " << x << ".Write(oprot)" << endl <<
-                   indent() << "    oprot.WriteMessageEnd()" << endl <<
-                   indent() << "    oprot.Flush()" << endl <<
-                   indent() << "    return false, " << x << endl <<
                    indent() << "  }" << endl <<
+                   indent() << "  iprot.Skip(thrift.STRUCT)" << endl <<
+                   indent() << "  iprot.ReadMessageEnd()" << endl <<
+                   indent() << "  " << x << " := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, \"Unknown function \" + name)" << endl <<
+                   indent() << "  oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)" << endl <<
+                   indent() << "  " << x << ".Write(oprot)" << endl <<
+                   indent() << "  oprot.WriteMessageEnd()" << endl <<
+                   indent() << "  oprot.Flush()" << endl <<
+                   indent() << "  return false, " << x << endl <<
+                   indent() << "" << endl <<
                    indent() << "}" << endl << endl;
     } else {
         f_service_ <<