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

simplify the if/else logic #179

Merged
merged 13 commits into from
Jan 25, 2019
Merged

simplify the if/else logic #179

merged 13 commits into from
Jan 25, 2019

Conversation

lewgun
Copy link
Contributor

@lewgun lewgun commented Jan 16, 2019

What problem does this PR solve?

simplify the if/else logic

What is changed and how it works?

refactor to simplify the if/else logic

Check List

Tests

  • Unit test

Code changes

  • N/A

Side effects

  • N/A

Related changes

  • N/A

@zhouqiang-cl
Copy link

/run-all-tests

1 similar comment
@zhouqiang-cl
Copy link

/run-all-tests

if strData1 > strData2 {
return false
}
return true
} else {
Copy link
Contributor

@amyangfei amyangfei Jan 19, 2019

Choose a reason for hiding this comment

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

recommend usage from golint: if block ends with a return statement, so drop this else and outdent its block

@amyangfei
Copy link
Contributor

Good job. Rest LGTM

@lewgun
Copy link
Contributor Author

lewgun commented Jan 20, 2019

@amyangfei PTAL

@amyangfei
Copy link
Contributor

/run-all-tests

@amyangfei
Copy link
Contributor

LGTM

@IANTHEREAL
Copy link
Collaborator

Thanks @lewgun, @WangXiangUSTC PTAL

pkg/diff/diff.go Outdated Show resolved Hide resolved
Copy link

@lonng lonng left a comment

Choose a reason for hiding this comment

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

Rest LGTM

@lonng lonng merged commit 695f68a into pingcap:master Jan 25, 2019
WangXiangUSTC pushed a commit to WangXiangUSTC/tidb-tools that referenced this pull request Feb 11, 2019
refactor to simplify the if/else logic
WangXiangUSTC added a commit that referenced this pull request Feb 13, 2019
* sync_diff_inspector: fix a misleading regex example in config.toml (#141)

* update pkg about database (#142)

* diff: add database name and table name router (#172)

* simplify the if/else logic (#179)

refactor to simplify the if/else logic

* diff: can use multiple columns to split chunks (#130)

* simplify the if/else logic (#191)
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