Curriculum Errors & packaging The error pattern exercise 5 · fill-word
The error pattern
Return the "no error" sentinel from the success path. Type the keyword.
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.