Defer
Go has a (sometimes) handy feature called defer. A list of commands is executed when a function exits, the defer list. This makes it simpler for a developer to place near relevant code some other… »
Go has a (sometimes) handy feature called defer. A list of commands is executed when a function exits, the defer list. This makes it simpler for a developer to place near relevant code some other… »
Recently a YouTube video “So you think you know Go” was doing the rounds with some Go gotchas. It’s an excellent little trip into some of the traps that Go developers may or may not… »