4 ms·
> OP has never heard of panic() and recover(), which are awful things that should not exist. OP is using panic in the Heartbleed script he wrote. Source highli
by rubiquity 13y ago
> OP has never heard of panic() and recover(), which are awful things that should not exist.
OP is using panic in the Heartbleed script he wrote. Source highlighted here: https://github.com/FiloSottile/Heartbleed/blob/master/bleed/heartbleed.go#L33-L47 https://github.com/FiloSottile/Heartbleed/blob/master/bleed/...
- sdegutis 13y agoAh yes, very good examples of how Go's error handling needs improvement.
- NateDad 13y agoUh, 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.
- FiloSottile 13y agoPlease consider that I wrote in a time measured better in minutes.
- rubiquity 13y agoI'm not criticizing your use of it, just showing the other person that you do know what panic is because you used it.