Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.9.2
-
None
-
Go 1.4.2
-
Patch Available
Description
When generating code with package_prefix option, the generated service remote tool does not import generated package with given package prefix.
For example, generate Go code for the following thrift:
namespace go testpkgprefix.api.thrift_gen service TestPkgPrefix { string echo(1: required string msg); }
with command:
thrift --gen go:package_prefix=repo.local/user/ -out src/repo.local/user -v idl/testpkgprefix.thrift
The resulted Go code will resides in src/repo.local/user/testpkgprefix/api/thrift_gen.
But the import statement of service remote tool ( src/repo.local/user/testpkgprefix/api/thrift_gen/test_pkg_prefix-remote/test_pkg_prefix-remote.go ) will be:
import ( ... // skip "testpkgprefix/api/thrift_gen" ... // skip
instead of:
import ( ... // skip "repo.local/user/testpkgprefix/api/thrift_gen" ... // skip
This issue prevents some tool which does full build (build with ./...) from function normally.