Generates boilerplate code for idiomatic error handling.

You can invoke the template on calls that return error or on any expressions of the error type. The template introduces new variables, assigns the expression to them, and checks if error is not nil by using the following code:

if err != nil {
  return value1, value2, ...
}

Each value is either the err variable or a default value of the corresponding return type of the enclosing function.