...
Package xdefer
Package xdefer implements an extremely useful function, Errorf, to annotate all errors returned from a function transparently.
func Errorf(err *error, s string, v ...interface{})
Errorf makes it easy to defer annotate an error for all return paths in a function.
See the tests for how it's used.
Pass s == "" to only annotate the location of the return.