-
Notifications
You must be signed in to change notification settings - Fork 727
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
*: enable error check for some files #8301
Conversation
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
Signed-off-by: okJiang <819421878@qq.com>
/retest |
1 similar comment
/retest |
err := handler.config.Persist() | ||
err := handler.config.BuildWithArgs(args) | ||
if err != nil { | ||
handler.rd.JSON(w, http.StatusInternalServerError, err.Error()) | ||
_ = handler.rd.JSON(w, http.StatusBadRequest, err.Error()) | ||
return | ||
} |
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.
How about using if err := BuildWithArgs(); err != nil
?
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.
Unless all places maintain a habit, either one is fine, no big deal😊
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.
I just noticed that you are using two methods to check for errors😛
https://github.com/tikv/pd/pull/8301/files#diff-e5d980e123257fd28befe0f6e57d03f2988cacc60a40a22a76afec251f6e53daR313
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.
I mean all repo keep one habit~
Signed-off-by: okJiang <819421878@qq.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8301 +/- ##
==========================================
- Coverage 77.39% 77.32% -0.07%
==========================================
Files 470 470
Lines 61387 61356 -31
==========================================
- Hits 47508 47443 -65
- Misses 10315 10342 +27
- Partials 3564 3571 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: HuSharp, rleungx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: Ref #1919
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note