#Error

2 posts

Go Intermediate #2 Error-Handling Patterns
8 min read

Go Intermediate #2 Error-Handling Patterns

Error wrapping (%w), errors.Is and errors.As, custom error types, and where panic fits.

Go Basics #4 Functions, Multiple Return, error Type
7 min read

Go Basics #4 Functions, Multiple Return, error Type

The various forms of function definition, Go's signature multiple-return pattern, and the error type with the if err != nil idiom you'll meet most.