Go error values, wrapping, and errors.Is

F-GOERR-V4-2medium

Give back a real nil

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

What needs to change

Repair checkSkill so a repairable item gives back no error.

Reproduce

  1. Run go run main.go with the two-item sample and compare the line 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, the SkillError type, the skills, checkSkill and main.

Input: up to 50 records, one visitor token and one item token per LF/CRLF line, with ASCII space/tab fields and ASCII framing. Each line is at most 4096 UTF-8 bytes; opaque tokens exclude field separators and CR/LF. toaster, bike and kettle are repairable.

Sign in to open this exercise

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

Sign in