Curriculum Errors & packaging The error pattern exercise 1 · mcq
The error pattern
Go has no exceptions. The error BUILT-IN INTERFACE is the
conventional vehicle for "something went wrong, here's what."
Pick the line that shows the canonical error interface
declaration — the one type built into the language that every
custom error implements implicitly (theme 4.1's lesson).
TypeScript reference
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.