Go error values, wrapping, and errors.Is

F-GOERR-V4-3hard

Keep every failure

A repair café books visitors for a time slot and checks that someone can repair the items they bring.

What needs to change

Repair checkVisit so every unrepairable item is reported.

Reproduce

  1. Run go run main.go with the two-visit sample and compare the lines for ana with the expected stdout.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains its imports, readRows, ErrNoSkill, the skills, checkVisit and main. main prints the error and checks it with errors.Is.

Input: up to 50 records, one visitor token followed by zero or more item tokens per LF/CRLF line, with ASCII space/tab fields and ASCII framing. Lines are at most 4096 UTF-8 bytes; opaque tokens exclude field separators and CR/LF. Repeated refused items are reported once per occurrence, in input order.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in