3 ms·
Go's defer keyword is good for this. You could also attach a finalizer to the struct, to panic/log in case it's never closed.
by vertex-four 13y ago
Go's defer keyword is good for this. You could also attach a finalizer to the struct, to panic/log in case it's never closed.