this is what you are not seeing... https://play.golang.org/p/tx9vAOnOoL

On Mon, Nov 6, 2017 at 10:22 AM, <[email protected]> wrote:

>
>
> On Monday, November 6, 2017 at 8:03:28 PM UTC+2, Ian Lance Taylor wrote:
>>
>> On Mon, Nov 6, 2017 at 8:55 AM,  <[email protected]> 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.
>>
>
> Thanks for clear explanation
>
>
>>
>> > I trying to make priority select by nesting selects, and want to find
>> way to
>> > write logic only in one place.
>>
>> Use a function?
>
>
> Yes, i consider using functions, just wonder why goto does not work,
>
> Thanks again.
>
> Jamil Djadala
>
>
>
>
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael T. Jones
[email protected]

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to