3 ms·
They are not the same though. I got bitten by this recently (Go beginner). In the single line form, both foo and err are scope restricted to the if block. Foun
by reddit_clone 8y ago
They are not the same though. I got bitten by this recently (Go beginner).
In the single line form, both foo and err are scope restricted to the if block. Found that out the hard way.