Homework
Homework — your library
YOUR app becomes a library — the second of three milestones (runs ✓ → holds many → saves).
Requirements:
var items []Item— the app holds many of your records.Add— builds a record from input (with lesson 6's number validation) andappends it.List— all records numbered from 1; an empty list gets a friendly message.- An edit branch by number (mark/change) — with a bounds check, mutation through
items[i]. - Port your lesson-6 numeric branches so they work on a chosen record.
gofmt+ a working transcript.
To submit: the code + a transcript: empty list → 3 records → an edit → the list showing the change.
Tip. Look back at your
main— after five lessons of growth it got long: branches carry 10 lines of logic each, some function names no longer match their jobs. Does it work? Yes. Is it clean? Not really. The next lesson is short but mandatory: code culture (gofmt, go vet, naming, doc comments) — so your library looks like a professional's, not a rough draft.