-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(hz): base type error and multiple service error for client #510
Conversation
Codecov ReportBase: 69.34% // Head: 69.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #510 +/- ##
===========================================
+ Coverage 69.34% 69.42% +0.07%
===========================================
Files 93 93
Lines 8874 8874
===========================================
+ Hits 6154 6161 +7
+ Misses 2355 2348 -7
Partials 365 365
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -142,7 +142,8 @@ func (pkgGen *HttpPackageGenerator) Generate(pkg *HttpPackage) error { | |||
|
|||
if pkgGen.CmdType == meta.CmdClient { | |||
clientDir := pkgGen.IdlClientDir | |||
clientDir = util.SubDir(clientDir, "hertz") | |||
// support multiple service, so disable "clientDir/hertz" | |||
// clientDir = util.SubDir(clientDir, "hertz") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just delete this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do it in another pr, this one has been merged~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done~, in pr
@@ -43,7 +43,8 @@ type ClientFile struct { | |||
|
|||
func (pkgGen *HttpPackageGenerator) genClient(pkg *HttpPackage, clientDir string) error { | |||
for _, s := range pkg.Services { | |||
hertzClientPath := filepath.Join(clientDir, "hertz_client.go") | |||
cliDir := util.SubDir(clientDir, util.ToSnakeCase(s.Name)) | |||
hertzClientPath := filepath.Join(cliDir, "hertz_client.go") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a const for hertz_client.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done~, in pr
What type of PR is this?
fix
Check the PR title.
(Optional) Translate the PR title into Chinese.
修复 hz 生成的 client 代码在使用基本类型作为入参时的错误,以及定义多 service 时出现的错误
(Optional) More detail description for this PR(en: English/zh: Chinese).
en: Fix a bug in hz-generated client code when using basic types as input, and when defining multiple services
zh(optional):
修复 hz 生成的 client 代码在使用基本类型作为入参时的错误,以及定义多 service 时出现的错误
Which issue(s) this PR fixes: