Skip to content
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

delete minor unreachable code caused by log.Fatal #4677

Merged
merged 2 commits into from
Dec 23, 2022

Conversation

Abirdcfly
Copy link
Contributor

@Abirdcfly Abirdcfly commented Aug 9, 2022

Signed-off-by: Abirdcfly fp544037857@gmail.com

What problem does this PR solve?

https://pkg.go.dev/log#Fatal

Fatal is equivalent to Print() followed by a call to os.Exit(1).

So the line 33 os.Exit(1) useless, and it also causes interference and gives the illusion that if I want to return exit code 2, then all I have to do is change it to ox.Exit(2) and that's it.

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.

NONE

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 9, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • KanShiori
  • csuzhangxc

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@CLAassistant
Copy link

CLAassistant commented Aug 9, 2022

CLA assistant check
All committers have signed the CLA.

@Abirdcfly
Copy link
Contributor Author

/cc @tennix

@ti-chi-bot ti-chi-bot requested a review from tennix August 9, 2022 13:35
@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2022

Codecov Report

Merging #4677 (bdefe51) into master (9e9e57b) will increase coverage by 8.66%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4677      +/-   ##
==========================================
+ Coverage   59.75%   68.41%   +8.66%     
==========================================
  Files         223      227       +4     
  Lines       25043    28023    +2980     
==========================================
+ Hits        14964    19172    +4208     
+ Misses       8670     7425    -1245     
- Partials     1409     1426      +17     
Flag Coverage Δ
e2e 52.68% <ø> (?)
unittest 59.76% <ø> (+<0.01%) ⬆️

@csuzhangxc
Copy link
Member

/run-all-tests

@csuzhangxc
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: bdefe51

@ti-chi-bot ti-chi-bot merged commit 1ea6aa0 into pingcap:master Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants