You measured Milestone 1's sequential fetch. Now make it concurrent — with the exact tools from this module — and prove the output didn't change.
The assignment
- Discover, then fan out. First request learns how many pages exist (
Linkheader, or fetch until short page once and remember). Then fetch all remaining pages concurrently: one goroutine per page, results into a channel,sync.WaitGroupto know when you're done. - Identical output. Collect everything, then sort — result order must not depend on goroutine timing. The report must be byte-identical to Milestone 1's (pipe both to files and
diffthem). - Race-clean.
go test -race ./...— every mistake this module's "Common Mistakes" section warned you about will attempt to happen in this code.
Done when
diff <(git stash && go run . repos --org kubernetes --format json) <(git stash pop && go run . repos --org kubernetes --format json)— or just save the old output first — shows no difference.go test -race ./...is clean.- The wall-clock number you wrote down in Milestone 1 just dropped by roughly the page count. Update the comment with the new time — that ratio is this module's lesson in one number.
Commit.