Errors Are Values
In Go, errors are just values — any type that implements the error interface (Error() string). There is no special exception mechanism. This means errors can be stored, wrapped, compared, and inspected like any other value. The repetition of if err != nil is the price of making error flow explicit.