Comment by randomdata
Comment by randomdata 8 days ago
> Some errors should be ignored and some shouldn’t.
Assuming the function author followed Go conventions, you never need to consider the error for the sake of using the function. Granted, there are some bad developers out there who will do something strange that will come to bite you, but that is not limited to errors (or any particular language).
You may still need the error for your own application requirements, but application requirements are pretty hard to forget. At very least, you are going to notice that your application is missing a whole entire feature as soon as you start using it.
Any function that returns an error obliges its callers to check that returned error before attempting to use any other returned value.
This is Go 101 type stuff.