Errors are values
Frames Go error handling as explicit value-oriented control flow rather than exceptions.
Frames Go error handling as explicit value-oriented control flow rather than exceptions.
- Author: Rob Pike
- Authority: primary
- Kind: blog
- URL: https://go.dev/blog/errors-are-values
What it covers
- explicit error returns
- error handling structure
- keeping success paths readable
Why authoritative
Foundational Go blog post by Rob Pike on idiomatic error handling.
Use when
- is this Go error handling idiomatic
- should this return an error
- how should Go code structure error handling
Keywords
- errors, error values, control flow, return early, idiomatic errors