3 ms·
At function exit. You can of course always create an anonymous function to emulate a block like: func() { defer something() ... }() This basically
by _ph_ 5y ago
At function exit. You can of course always create an anonymous function to emulate a block like:
func() {
defer something()
...
}()
This basically has the same behavior as having a block there, but with the defer being called at the exit of that functions body.