Hacker News new | ask | show | jobs
by randomdata 647 days ago
No. No rearranging of the code would fix the problem.
1 comments

Hmm. Checked the docs, looks like os.Create returns *File and err, but the sample doesn’t check that error.
os.Create, per the topic of discussion, is said to throw an error using the exception handling mechanism rather than return error. The exception handler checks the error.

If you focus on errors, you’re going to never get it. The whole idea here is that the problem is bigger than errors.