My rule of thumb is -- you only need to check the error if you care about the result of the function. For example
x, err := fn()
If you want to use the value of x, you must first check the error. The example you provided, IMO, is an exception to almost all the rules, and shouldn't be used as a basis for forming a general strategy around error handling. To explain what I mean,
fmt.Sprint{f,ln} does not return an error
fmt.Fprint{f,ln} takes an io.Writer to write to, you should check the error there -- if you care about the write succeeding. Alternatively you might defer error checking til the end of you use of the writer, as most underlying writers will return a persistent error when w.Close() is called. ie, if a write to the writer failed, the close will also return some kind of error, also noting that most writers do not flush their data to disk until they are closed. You may also be using a wrapper like the one Rob described here,
https://blog.golang.org/errors-are-values, to enforce the behaviour described above.
fmt.Printf is the exception, because it is a convenience method around fmt.Fprintf(os.Stdout). Most code skips the error checking there because, a, it's unusual for stdout to be closed, b. if it is closed, what are you going to do about it. Ignoring the error checking here falls back on the logic of "you only need to check the error if you care about the result of the function" -- in not checking that a write to stdout succeeded the authors of that code are saying explicitly that they don't care if it worked or not, which in general seems to be the right trade off.
Thanks
Dave