Error Handling
Error
The error
type is an interface type. An error
variable represents any value that can describe itself as a string.
Error handling in Go
Errors are values in Go. You can choose either to panic or return the error as a value.
If you want to recover from a panic and return a value, take a look at this: Effective Go - Recover.
Custom Error Wrapper
Here's an example(excuse me for coming up with a bad one).
References
Last updated