By convention, the last return value is an error with also the type 'error'. If there are no errors to be returned, we can simply return
nil in the error position.
In the above example,
f() returns no error, while
g() returns an error with description as "invalid".
We have actually created a "custom" error using the
errors.New() method. Similarly, you can pass any string to this method and return a custom error message.