News for hackers. Stuff that matters.
Re:Why Go's Error Handling Is Awesome by harpratap on Tuesday July 07, 2020 @09:10AM (#23758819)
Can't you simply return a nil error in case you want to return a value? Check for error and if nothing bad happened use the value.
Re:Why Go's Error Handling Is Awesome by leshow on Tuesday July 07, 2020 @09:44AM (#23759161)
There is nothing stopping you from returning both an error and a value. Sure, you can just be diligent everywhere and not do that, we know how well that type of advice usually turns out.