2 ms·
I recommend writing `if _, err := ...; err != nil { ... }` where ever possible, to avoid the case above where you overwrite the existing error. It is not possi
by jrockway 6y ago
I recommend writing `if _, err := ...; err != nil { ... }` where ever possible, to avoid the case above where you overwrite the existing error.
It is not possible to always do this; `if val, err := ...; err != nil { } else { use(val) }` is a Bit Much.