Learn Go with AI · Free online book

Appendix D: Review checklists

In short: Appendix D collects every chapter's review checklist and every 'Where AI gets Go wrong' box in one place, plus two lists for whenever the AI reviews or writes code: how to review its code and how to decide on each suggestion.

Every chapter’s Review checklist and “Where AI gets Go wrong” box, gathered in one place, plus the two lists you use whenever the AI reviews or writes code. Use it when you review your own code, or the AI’s.

The chapter sections are quoted unchanged from Chapters 1 to 7, where every command and output was run for this edition (Go 1.27.4). Inside them, words like “this chapter,” “below,” “Break 1” or “the Practice exercise,” and instructions such as “Add these two lines as the last lines of main,” refer to that chapter and its code.

Reviewing the AI’s code

  1. Scope: git status --short lists only what you asked for, never a test file.
  2. Checks: go run ./check, plus go test -race ./... if goroutines share the code.
  3. Diff: git add ., then git diff --staged. Read every line, including changes you didn’t ask for.
  4. Questions: Can you explain it? Does every error path return? Does it match SPEC.md, including status codes? For a server, try it for real with curl.

Deciding on a review suggestion

  1. Do I understand it? If you can’t explain it, you can’t keep it.
  2. Does it fit this project? It must follow your rules: AGENTS.md (Go 1.27, standard library only) and the book’s Must know points, like money in cents.
  3. Do the tests still pass? Make one change at a time and run go test ./... after each.

Each suggestion gets one of four verdicts, the same ones the chapters’ review tables use:

Chapter 5’s review table writes Skip for now as just Skip; they’re the same verdict.

Chapter 1: Learning to Code When AI Can Code

Check it yourself

Chapter 2: Your First Program and Your First Test

Check it yourself

Chapter 3: Lists, Lookups and Loops

Check it yourself

Chapter 4: Modeling Data and Handling Errors

Check it yourself

Chapter 5: Organizing Code: Packages and Interfaces

Check it yourself

Chapter 6: From Command Line to Web

Check it yourself

Chapter 7: A Taste of Goroutines

Chapter 7 has no “Check it yourself” list. Its Review checklist is the “Questions for this kind of change” from Review the AI’s work, plus the first question for the import feature: