Example code: https://play.golang.org/p/dVtPVt3oKt

---

I thought this code will work fine, but didn't, because of "fallthrough 
statement out of place" error.
Maybe `fallthrough` statement cannot be used in `if` block even if it's put 
inside `swicth` block)

So, my question is, which is better measure to solve this.

1. Use if-else instead of switch
2. Use goto (like this: https://play.golang.org/p/TILUCapta6) (I think this 
should be avoided. I would confise LABEL expression with one case)
3. Other (please comment)

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to