mirror of
https://github.com/therootcompany/golib.git
synced 2026-11-04 06:55:00 +00:00
Human-maintained sources (Google Sheets exports) often carry stray blank rows. A blank row above the header was taken as the header, so every data row decoded to zero values; blank data rows decoded as empty records. ParseCSV now consumes the stream, drops records whose cells are all empty or whitespace-only, and replays the remaining records (first = header) through the csvutil decoder via a small recordReader. No delimiter or field-count handling changes; ragged-row behavior of the underlying csv.Reader is untouched. Adds 5 tests: blank header row (csv + tsv), blank/whitespace data rows, normal-input regression, all-blank input.