Go 2 error values today
summary
Proposal entering Go 1.13 adds concrete APIs and an implementation in the source tree: errors.Is walks wrapped errors and matches sentinel or dynamic predicates, Unwrap exposes the immediate cause, FormatError plus a single-frame model provides structured, localizable printing, and x/errors gives a backport and adapters for earlier releases. Migration notes cover automatic formatting heuristics for fmt.Errorf, a new %w verb to record wrapped errors, some runtime overhead for frames, and examples showing clearer checks and cleaner core-library code.
AI-written summary · about
chapters (6)
- 0:00Start
- 2:43Custom error type
- 5:41Error inspection: Wrapper
- 9:46Normal versus Detail
- 10:23Error printing: Formatter and Printer
- 11:45Error Printing: Example








