Errors
Go programs express error state with error
values. The error
type is a built-in interface similar to fmt.Stringer
:
Functions often return an error
value, and calling code should handle errors by testing whether the error equals nil
. A nil error
denotes success; a non-nil error
denotes failure.
Example
Last updated