Can be called on variables and expressions of the error type.
Replaces the err variable with the following construction:
if err != nil {
return value1, value2, ...
}Replaces the expr expression with the following construction:
if err := expr; 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. You can call this template on expressions with multiple values.