Closed kvigen closed 9 years ago
@azylman assigned to you
What do you think of, instead of adding functions that support custom delimiters, adding functions that take in arbitrary csv.Reader
s and csv.Writer
s? Then people can use whatever options they want.
This looks great!
lgtm
Previously, the
csv
source didn't allow configuration of CSV options and would always use the defaults. This means that lots of things were impossible, e.g. reading a tab-delimited file.This change maintains the old function for backwards compatibility, but adds a new function that creates a
csv
source from acsv.Reader
, allowing the consumer to specify any options they desire.We test this by making an
io.Reader
with tab-delimited CSV data, making acsv
source from it, and verifying that we get the correct data from theTable
.