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

(CRT-A0014) switch with single case can be rewritten as if-else #20

Closed
johnsonjh opened this issue Apr 17, 2021 · 1 comment
Closed
Labels
wontfix This will not be worked on

Comments

@johnsonjh
Copy link
Owner

Description

Single-statement switch can be replaced by if-else. For single statements, if-else appears to be more readable. Example: go switch x := x.(type) { case int: body() } should be written as: go if x, ok := x.(int); ok { body() }

Occurrences

There are 2 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/gfcptun/issue/CRT-A0014/occurrences/

@johnsonjh johnsonjh added the wontfix This will not be worked on label Apr 17, 2021
@repo-ranger
Copy link
Contributor

repo-ranger bot commented Apr 17, 2021

⚠️ This has been marked to be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant