This is such an elegant solution, I'm surprised I don't see it recommended more! I never would have thought to use defer to clean up the error catching noise.
if err != nil { return }
would get turned into if err != nil {
return
}
By gofmt.
So if you want your code to be well formatted, you still get some visual polution from the error handling there.