Started writing documentation and adding examples

This commit is contained in:
Leon Mika 2023-04-24 06:09:22 +00:00
parent 7adb09d4db
commit 405bf812ee
5 changed files with 40 additions and 0 deletions

4
csv.go
View file

@ -6,6 +6,10 @@ import (
"io"
)
// CSVColumn is a filter function that reads the source as a CSV file and extracts the cell
// values of the named column, excluding the header itself. If the column cannot be found,
// the filter will produce nothing. If the column index is beyond the number of columns
// for a particular row, it will be skipped.
func CSVColumn(name string) func(r io.Reader, w io.Writer) error {
return func(r io.Reader, w io.Writer) error {
cr := csv.NewReader(r)