You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2015/03/03 21:36:03 UTC

[3/3] thrift git commit: THRIFT-3021 Service remote tool does not import stub package with package prefix Client: Go Patch: Yinyin L

THRIFT-3021 Service remote tool does not import stub package with package prefix
Client: Go
Patch: Yinyin L <yi...@gmail.com>

This closes #385


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

Branch: refs/heads/master
Commit: eda0f844ee5f564aa50e5d406b0ff0350beba9f6
Parents: a6ea444
Author: Jens Geyer <je...@apache.org>
Authored: Tue Mar 3 21:21:19 2015 +0100
Committer: Jens Geyer <je...@apache.org>
Committed: Tue Mar 3 21:35:44 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/thrift/blob/eda0f844/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 87681e1..cb1ec80 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -1975,6 +1975,9 @@ void t_go_generator::generate_service_remote(t_service* tservice) {
   while ((loc = service_module.find(".")) != string::npos) {
     service_module.replace(loc, 1, 1, '/');
   }
+  if(!gen_package_prefix_.empty()) {
+    service_module = gen_package_prefix_ + service_module;
+  }
 
   f_remote << go_autogen_comment();
   f_remote << indent() << "package main" << endl << endl;