3 ms·
The example above has an operation that might fail between the Open and the return. Leaving that out of course makes the example useless, but if you keep that p
by jjnoakes 4y ago
The example above has an operation that might fail between the Open and the return. Leaving that out of course makes the example useless, but if you keep that part in, you can't use go's simple defer pattern to help you close the file if that intermediate operation fails.