I do not see how defer would have helped in this case.
People manually doing resource cleanup by using goto.
I'm assuming that using defer would have prevented the gotos in the first case, and the bug.
People manually doing resource cleanup by using goto.
I'm assuming that using defer would have prevented the gotos in the first case, and the bug.