Re:Why Go is elegant and makes my code elegant
by FiloSottile on Wednesday April 09, 2014 @06:08PM
(#7562811)
Please consider that I wrote in a time measured better in minutes.
Re:Why Go is elegant and makes my code elegant
by rubiquity on Wednesday April 09, 2014 @06:39PM
(#7562991)
I'm not criticizing your use of it, just showing the other person that you do know what panic is because you used it.
Re:Why Go is elegant and makes my code elegant
by sdegutis on Wednesday April 09, 2014 @06:02PM
(#7562770)
Ah yes, very good examples of how Go's error handling needs improvement.
Re:Why Go is elegant and makes my code elegant
by NateDad on Thursday April 10, 2014 @04:18PM
(#7569416)
Uh, no. You shouldn't use panic for error handling. You should basically never use panic unless you have some small bit of recursive algorithm inside your package that you want to be able to easily unwind. For general error handling you should only ever use error returns.
OP is using panic in the Heartbleed script he wrote. Source highlighted here: https://github.com/FiloSottile/Heartbleed/blob/master/bleed/...