News for hackers. Stuff that matters.
Re:Go 1.6 is Released by kasey_junk on Wednesday February 17, 2016 @08:37PM (#11123042)
Oh my god...is that new? I swear I've tried that and it didn't work. You are my new hero.

[edit]

Though maybe I was thinking of adding parameters like https://play.golang.org/p/FKUMlQzCI5

In any case 'thebaer continues to be my hero.

Re:Go 1.6 is Released by tptacek on Wednesday February 17, 2016 @09:43PM (#11123302)
It's how html/template.Must works, isn't it?

We have a small library of functions for sweeping up error returns, and for collecting errors from multiple functions and checking them all at once. It helps a lot.

Golang is very much on to something with it's "errors are values" philosophy, but I'd be the first to acknowledge that it's not a fully baked philosophy. It is weird to discover fundamental things about how to structure basic code several years into writing in a language, but that happens somewhat regularly with Go.

Re:Go 1.6 is Released by kasey_junk on Wednesday February 17, 2016 @11:49PM (#11123795)
I could justify my ignorance by pointing out that for all the time I've spent using Go with http, I've not had occasion to use it for html. But, that would only mask my utter embarrassment at missing a core language feature, and worse yet something I complain about as a weakness of Go.

I'll be over here muttering to myself about monadic error values...don't mind me.

Re:Go 1.6 is Released by pa7ch on Wednesday February 17, 2016 @10:19PM (#11123462)
Would you, by chance, be able to link or share that error lib? I'd love to see more solutions for error handling to get a better grasp.
Re:Go 1.6 is Released by thebaer on Wednesday February 17, 2016 @09:21PM (#11123222)
Haha, I'll take it. Go forth and wield your new power! I'm not able to find anywhere official documenting it, but yeah I don't believe it's new.

Edit: prodigal_erik found it: https://golang.org/ref/spec#Calls