They still haven't solved shadowing.
a, err := foo()
b, err := bar()
if err != nil { // oops, forgot to handle foo()'s err }
This is the illusion of safe error handling.I’m surprised I don’t see this mentioned more. This is spooky action at a distance at its worst. And it’s not even limited to error handling. Any multi value assignment works like this.
It's fairly obvious when writing Go that `err` is being shadowed and needs to be checked after each expression. You should be wrapping them anyways!
I would be astonished if there isn't an automated tool to check for that at the push of a button. I would be mildly surprised if there isn't a compiler flag to check for it.