IMO, the author's "copy data to stdout" example betrays a lack of language understanding. Here's a more idiomatic version: http://play.golang.org/p/ZWatRuj3Q_
IMO, the author's "copy data to stdout" example betrays a lack of language understanding. Here's a more idiomatic version: http://play.golang.org/p/ZWatRuj3Q_
Thanks! I'm just learning go (started last night), but I couldn't believe there wasn't a better way. It felt like a straw man example.
Kind of code golfing it: http://play.golang.org/p/s53zQrE0ei
What happens when copy fails? Don't worry I already know.