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

You can do this in many ways, but you can also do it like this:

Start a goroutine and use channels to communicate and coordinate reading/writing. Use defer in the goroutine.



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

Search: