I guess with select you can't do the comma for multiple cases having one 
behavior like with switch:

select{
case <-c1, <-c2: // gofmt: expected 1 expression
    fmt.Println("c1 or c2")
case <-c3:
}

switch s{
case v1, v2:
    fmt.Println("v1 or v2")
case v3:
}

I assume this is because select cases have an optional var assignment. This 
would have been nice for detecting an explicit client cancel action versus 
a w.(http.CloseNotifier).CloseNotify() where the resulting server action is 
the same.

Matt

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