Started writing documentation and adding examples
This commit is contained in:
parent
7adb09d4db
commit
405bf812ee
5 changed files with 40 additions and 0 deletions
4
csv.go
4
csv.go
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue