Proverbs turned into code review comments
- Short names in small scopes; longer names for exported API.
- Sentinel errors (
var ErrX) for expected cases. - Wrap with
%w; check witherrors.Is/errors.As. - Accept interfaces, return concrete types.
- Make the zero value useful.
Output
Press Run to execute your code.