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

planner: tidy code more go style #9845

Merged
merged 1 commit into from
Mar 21, 2019
Merged

planner: tidy code more go style #9845

merged 1 commit into from
Mar 21, 2019

Conversation

xiekeyi98
Copy link
Contributor

Golang will auto-init the variable.
We do not need it.
warning: should drop = nil from the declaration of var authErr; it is the zero value (golint)

Signed-off-by: Keyi Xie [email protected]

What problem does this PR solve?

Make the code more like go style.

What is changed and how it works?

Remove useless init.

Check List

Tests

  • Unit test
  • Integration test

Golang will auto init the variable.
We do not need to it.
warning: should drop = nil from declaration of var authErr; it is the zero value (golint)

Signed-off-by: Keyi Xie <[email protected]>
@xiekeyi98 xiekeyi98 added the sig/planner SIG: Planner label Mar 21, 2019
@xiekeyi98
Copy link
Contributor Author

/run-all-tests

@ngaut
Copy link
Member

ngaut commented Mar 21, 2019

LGTM

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@xiekeyi98 xiekeyi98 added the status/LGT2 Indicates that a PR has LGTM 2. label Mar 21, 2019
@ngaut
Copy link
Member

ngaut commented Mar 21, 2019

/run-all-tests

@codecov
Copy link

codecov bot commented Mar 21, 2019

Codecov Report

Merging #9845 into master will decrease coverage by 0.0012%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##             master      #9845        +/-   ##
================================================
- Coverage   67.1592%   67.1579%   -0.0013%     
================================================
  Files           381        381                
  Lines         80056      80056                
================================================
- Hits          53765      53764         -1     
  Misses        21500      21500                
- Partials       4791       4792         +1

@ngaut ngaut merged commit cca7ec3 into pingcap:master Mar 21, 2019
@xiekeyi98 xiekeyi98 deleted the smallpatch branch March 21, 2019 11:52
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/planner SIG: Planner status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants