Project: Test Results Report
A command-line tool reading CSV from standard input, aggregating per board, and reporting bad lines.
The same small tool as in the Rust and Kotlin courses, written in idiomatic Go: a bufio.Scanner over standard input, a map of per-board statistics, and errors reported on standard error. Comparing the three versions is a good way to see each language's style.
The program
bufio.Scanner reads standard input line by line.
perBoard maps a board name to a *stats pointer, created on first use.
Problems go to os.Stderr with the line number; processing continues.
slices.Sorted(maps.Keys(perBoard)) prints boards in a stable order.
Shipping it
strings.Split for CSV with quoted fields Use encoding/csv A field like "rev_b, spare" contains a comma inside quotes; a real CSV parser handles quoting and escaping.
Why print diagnostics to os.Stderr?
So the report on standard output can be piped or saved cleanly while errors still reach the user.