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

Use type switch #5122

Merged
merged 5 commits into from
Oct 19, 2018
Merged

Conversation

cristaloleg
Copy link
Contributor

Found by go-critic typeSwitchVar checker

Log

modules/base/tool.go:444:2� typeSwitchVar� case 0 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 1 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 2 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 3 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 4 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 5 can benefit from type switch with assignment
modules/base/tool.go:444:2� typeSwitchVar� case 6 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 0 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 1 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 2 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 3 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 4 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 5 can benefit from type switch with assignment
modules/base/tool.go:463:2� typeSwitchVar� case 6 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 0 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 1 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 2 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 3 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 4 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 5 can benefit from type switch with assignment
modules/base/tool_test.go:302:3� typeSwitchVar� case 6 can benefit from type switch with assignment

@codecov-io
Copy link

codecov-io commented Oct 19, 2018

Codecov Report

Merging #5122 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5122      +/-   ##
=========================================
- Coverage    37.4%   37.4%   -0.01%     
=========================================
  Files         307     307              
  Lines       45545   45545              
=========================================
- Hits        17036   17035       -1     
+ Misses      26054   26053       -1     
- Partials     2455    2457       +2
Impacted Files Coverage Δ
modules/base/tool.go 74.52% <100%> (ø) ⬆️
models/repo_indexer.go 50.84% <0%> (-1.28%) ⬇️
models/repo_list.go 63.37% <0%> (+1.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a908b29...910033a. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 19, 2018
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 19, 2018
@lunny lunny added the type/enhancement An improvement of existing functionality label Oct 19, 2018
@lunny lunny added this to the 1.7.0 milestone Oct 19, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 19, 2018
@techknowlogick techknowlogick added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Oct 19, 2018
@techknowlogick techknowlogick merged commit 971dccd into go-gitea:master Oct 19, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants