Error Handling in GO
GO uses its capability to return multiple values for error handling, meaning that errors in go are regular values returned from a function. The developer must check the returned error value and handle it accordingly.
Error handling can quickly become non-trivial. You may want to change your behaviour if an error occurs, either substitute the failed functionality to increase fault tolerance or display an easy-to-understand error message to the user that does not intimidate them with long traces.
(more…)