Can be called on variables and expressions:
1. Replaces variable err of error type with
if err != nil {
return value1, value2, ...
}
Each value is either err variable itself or a default value of the corresponding return type of the enclosing function.
2. Replaces expression expr of error type with
if err := expr; err != nil {
return value1, value2, ...
}
Each value is either err variable or a default value of the corresponding return type of the enclosing function.
Can be called on multi-valued expressions.