3 ms·
Don’t defer Close() on writable files
- SamReidHughes 9y agoEven if you check the error on close you don't know the data's been written to disk. This doesn't win you any guarantees on its own, but it is necessary to consider if you do sync later and want to prevent errors from leaking through.