onerr is a very small package that provides functions to quickly handle errors.
f, err := os.Create("output.txt")
onerr.Panic(err) // Panics if the file cannot be created.
defer onerr.LogFunc(f.Close) // Logs any error while closing the file.
_, err = f.WriteString("output")
// Logs any write error like: error while writing "output.txt": disk is full
onerr.Logf(err, "error while writing %q", f.Name())
https://godoc.org/gopkg.in/onerr.v1
go get gopkg.in/onerr.v1