Answer the question
In order to leave comments, you need to log in
How to work with switch golang?
Why does this construction not work in GO:
switch type {
case "":
case "football":
log.Print(1)
break
case "basketball":
log.Print(2)
break
}
switch type {
case "":
log.Print(1)
break
case "football":
log.Print(1)
break
case "basketball":
log.Print(2)
break
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question