Hacker News new | ask | show | jobs
by jenius 4543 days ago
First of all thanks for making this - I'm definitely interested in go, and resources like this really help people like me to get started writing little programs. I watched the first screencast with the http request and I had a quick question:

When doing the http request, I notice you had to check explicitly for errors in three separate places. As a guy coming from mostly a node background, I'm certainly accustomed to having to handle error checking at multiple points in async code, but usually I'll use promises to propagate the error down the chain and handle any errors that occurred at a single point. This is a really elegant way to handle errors and makes some potentially super ugly async code really clean.

Is the standard way to handle errors in async code in go what you did in this screencast, or is there a more elegant way to do it in go that you just haven't covered yet?