Just write `defer v.Close()`? In almost all cases, `close(2)` errors can be safely ignored. Rust also does this: https://github.com/rust-lang/rust/blob/792fc2b033aea7ea7b766...
I don’t think you want to do this for files you’ve opened for writing.
In fact it’s quite common to “commit” on close, at least from what I’ve seen.
I don’t think you want to do this for files you’ve opened for writing.
In fact it’s quite common to “commit” on close, at least from what I’ve seen.