Re:Toward Go 1.3
by ansible on Tuesday February 11, 2014 @04:56PM
(#7220761)
... To be concrete, you have to remember to use "defer" in Go to clean up resources and locks, ...
You should probably be using defer() all the time anyway, unless you have a good reason not to. It also helps with code evolution, in the cases where some yahoo adds a new return statement in the middle of a function.
You should probably be using defer() all the time anyway, unless you have a good reason not to. It also helps with code evolution, in the cases where some yahoo adds a new return statement in the middle of a function.