Theory

Naming and doc comments

The tools fix the form; names and explanations are on you.

Naming — MixedCaps. Go style: pagesPerDay, listItems, formatItem. Not pages_per_day (Python style), not PAGES_PER_DAY. Short names for short lifetimes (i, it in a loop), clear names for functions.

A doc comment — a sentence above a function or type, starting with its name:

// listItems prints every item, numbered.
func listItems(items []Item) {

Compare with comment-noise: // function for printing — adds nothing. A doc comment answers "what and for whom", not "that it exists". You have seen them in our sample programs since lesson 3 — now you know why.

And now, Go's strictness gem:

Gotcha. An unused import or variable in Go is not a warning — it is a compile error:

imported and not used: "strconv"
declared and not used: title

This shocks people coming from other languages: "why won't it even RUN?!" The reason is simple — unused code lies to the reader. Deleted the branch that used strconv? Delete the import too (or let gofmt's sibling goimports do it). For a temporary "I'll need it soon" there is the _ = title trick — but it must stay temporary.