Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Haha yep, it's those edge cases, to quote one of the many web pages documenting it:

  Channels exhibit the following properties:

    * send to a nil channel blocks forever
    * receive from a nil channel blocks forever
    * send to a closed channel panics
    * receive from a closed channel returns the zero value immediately
I have this bookmarked because I don't write Go enough to remember it by heart.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: