On Mon, Nov 6, 2017 at 8:55 AM,  <djad...@gmail.com> wrote:
>
> Can someone explain, is this program  is really incorrect:
> https://play.golang.org/p/0fp9Nt_99L
>
> trying to run it results in error:
> tmp/sandbox536393528/main.go:16:9: goto C jumps into block starting at
> tmp/sandbox536393528/main.go:10:2
> but goto jumps in outside block.

Every case in a switch is an implicit block, so, yes, this program is
invalid and the compiler is telling you why.


> I trying to make priority select by nesting selects, and want to find way to
> write logic only in one place.

Use a function?

Ian

-- 
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