If I do the latter, I cannot ignore `err`. If I do, the compiler yells at me because there is now an unused value in my code.
If I do the former, then I made the conscious choice that the error doesn't matter to me. Yes, this goes for `foo()` as well, because Go makes it exceedingly clear that errors are just return values, and that call ignores all returns.
How? What exactly makes this "too easy"?
In regards to a functions error returns, there are exactly two things a caller can do
If I do the latter, I cannot ignore `err`. If I do, the compiler yells at me because there is now an unused value in my code.If I do the former, then I made the conscious choice that the error doesn't matter to me. Yes, this goes for `foo()` as well, because Go makes it exceedingly clear that errors are just return values, and that call ignores all returns.