Some say Go errors suck: try this refactoring pattern [video]
youtube.com
youtube.com
Using this pattern we can extract errors to the earliest possible discovery time, and also help make parts of our code no longer return errors, removing a bunch of if err != nil checks, and error wrapping.