News for hackers. Stuff that matters.
Re:Go Bloviations by crawshaw on Tuesday September 25, 2012 @09:19AM (#4570142)
For those who didn't dive into the spec, the non-blocking recieve syntax has changed to use the select statement:

  func f(ch chan int) {
  	select {
  	case v := <-ch:
  		fmt.Println("got", v)
  	default:
  		fmt.Println("did not block")
  	}
  }
http://play.golang.org/p/ql0qSUVXeX

There are no comments on this comment yet.