Parse & generate ready
CSV.parse and CSV.generate over the full dialect surface: column/row separators, quote character, and the quoting rules Ruby’s CSV uses.
Ruby's CSV parser & generator in pure Go โ MRI-compatible, no cgo.
go-ruby-csv is a pure-Go (no cgo) reimplementation of Ruby's CSV library โ a Parse reader and a Generate writer that match reference Ruby's behaviour byte-for-byte. It covers the way Ruby's CSV works: configurable dialects (col_sep / row_sep / quote_char) and quoting rules, headers via Row and Table, the built-in :integer / :float / :date converters, and MalformedCSVError raised at the same positions. It was extracted from rbgo's prelude/internals into a reusable standalone library: no dependency on the Ruby runtime, the dependency runs the other way. It is the CSV backend for go-embedded-ruby, bound by rbgo as a native module just like go-ruby-regexp and go-ruby-erb โ differential-tested against MRI, 100% coverage, CI green across 6 arches and 3 OSes.
CSV.parse and CSV.generate over the full dialect surface: column/row separators, quote character, and the quoting rules Ruby’s CSV uses.
Configurable col_sep / row_sep / quote_char, with minimal vs. forced quoting and embedded-newline handling matching MRI byte-for-byte.
Row and Table with header access, duplicate-header handling, and header/field converters, the way reference Ruby’s CSV::Row / CSV::Table work.
The built-in :integer / :float / :date field converters and header converters, applied with Ruby’s ordering and fall-through semantics.
Raised on unclosed quotes and stray quote characters at the same positions, with the same line/column information as reference Ruby.
A wide corpus parsed and generated both here and by the system ruby/csv, compared byte-for-byte; 100% coverage, gofmt + go vet clean, green across all six 64-bit Go arches and three OSes.
A faithful port of Ruby's CSV parser and generator in pure Go, cgo disabled, so it cross-compiles and embeds anywhere. It parses and generates across the full dialect surface โ col_sep / row_sep / quote_char, minimal and forced quoting, embedded newlines โ with Row / Table headers, the :integer / :float / :date converters, and MalformedCSVError. Validated differentially against the system ruby binary โ parsed and generated output compared against Ruby's csv. It is a standalone, reusable module extracted from rbgo's internals, and the CSV backend for the sibling org github.com/go-embedded-ruby.