3 ms·
It's not the `if err != nil` that's the problem, it's the following `return nil`. As I mention above, return instead the error with some identifying informatio
by kitd 3y ago
It's not the `if err != nil` that's the problem, it's the following `return nil`.
As I mention above, return instead the error with some identifying information and context, and you get highly targeted details needed to locate and fix the problem. And the way Go handles this makes it simpler than doing it via exception handling.