Curriculum Errors & packaging The error pattern exercise 4 · fill-word
The error pattern
Type the stdlib PACKAGE NAME you import for errors.New,
errors.Is, errors.As. Lowercase, six letters.
TypeScript reference
Fill the blanks →
About this theme
Go has no exceptions for ordinary control flow. Errors are values returned alongside results — (T, error). The caller checks err != nil and decides. This feels noisy at first; it becomes legible once you trust the convention. fmt.Errorf("... %w", err) wraps, preserving the inner error.