Conditions that are always true
func main() {
AAAA("tcp")
}
func AAAA(network string) {
switch network {
case "tcp", "tcp4", "tcp6":
default:
network = "tcp"
}
switch network {
case "tcp":
fmt.Println("tcp")
case "tcp4":
fmt.Println("tcp4")
case "tcp6":
fmt.Println("tcp6")
}
}
case "tcp6":
Conditions that are always true
Inspection Info: Reports conditions in your code that always evaluate to true or false
Please sign in to leave a comment.
We already have an open case for this issue – GO-16669 (https://youtrack.jetbrains.com/issue/GO-16669).
Feel free to upvote and subscribe to the case to stay updated on any progress.