3 ms·
I use var err error at the beginning of the function if needed.
by forgotAgain 11y ago
I use
var err error
at the beginning of the function if needed.
- jgome 11y agoThis helps prevent variable shadowing when using :=, which is yet another weird feature of the language... BTW, if you really want to make sure you don't make mistakes, use the compiler tools, or, better yet, https://github.com/alecthomas/gometalinter https://github.com/alecthomas/gometalinter .