Started writing documentation and adding examples
This commit is contained in:
parent
7adb09d4db
commit
405bf812ee
5 changed files with 40 additions and 0 deletions
13
csv_test.go
13
csv_test.go
|
|
@ -29,3 +29,16 @@ func TestCSVColumn(t *testing.T) {
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
func ExampleCSVColumn() {
|
||||
script.Slice([]string{
|
||||
"letter,fruit,word",
|
||||
"a,apple,alpha",
|
||||
"b,banana,bravo",
|
||||
"c,cherry,charlie",
|
||||
}).Filter(scriptx.CSVColumn("fruit")).Stdout()
|
||||
// Output:
|
||||
// apple
|
||||
// banana
|
||||
// cherry
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue