(CRT-A0014) switch
with single case can be rewritten as if-else
#20
Labels
wontfix
This will not be worked on
switch
with single case can be rewritten as if-else
#20
Description
Single-statement
switch
can be replaced byif-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/
The text was updated successfully, but these errors were encountered: