|
|
|
|
|
by mukunda_johnson
542 days ago
|
|
Adding error checks everywhere when you don't care about them is one of the ugliest things about Go. What I do is have a utility package that lets me panic on most errors, so I can recover in a generalized handler. x, err := doathing() Catch(err, "didn't do the thing") The majority of error handling is "the operation failed, so cancel the request." Sure there are places where the error matters and you can divert course, but that is far from the majority of cases. |
|