> > A receive expression used in an assignment > <https://golang.org/ref/spec#Assignments> or initialization of the > special form > > x, ok = <-ch > x, ok := <-ch > var x, ok = <-ch > var x, ok T = <-ch > > yields an additional untyped boolean result reporting whether the > communication succeeded. The value of ok is true if the value received > was delivered by a successful send operation to the channel, or false if > it is a zero value generated because the channel is closed and empty. >
Why it's untyped? And how to make the last expression to work? Seems I can't use anything but bool. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0713b282-00ae-4119-bbe9-559ca912aa82o%40googlegroups.com.