Propagating errors up to the callers is tedious. You end up with many lines looking like:

r, err := os.Open("my file")
if err != nil {
    return err
}

This kind of error handling diligence is crucial for writing robust software.

Sometimes you write shorter cmd-line programs where such discipline is not warranted.

You can simplify error handling with a helper functions PanicIfErr(err error, args ...interface{}):

r, err := os.Open("my file")
PanicIfErr(err)

Implementation of such helper:

https://codeeval.dev/gist/7a604ace0129bb6cea464e447bca5a60