Skip to content

Commit

Permalink
Clarified documentation of data.CSVBy* functions (#1714)
Browse files Browse the repository at this point in the history
* Clarified documentation of data.CSVBy* functions

fixes #1711

* Restore commas in description of header parameter

* Update docs-src/content/functions/data.yml

Co-authored-by: Dave Henderson <[email protected]>

* apply suggested edits to remaining files

* apply suggested edits to data.go

---------

Co-authored-by: Dave Henderson <[email protected]>
  • Loading branch information
giorgiga and hairyhenderson authored Apr 16, 2023
1 parent 9b81df3 commit 3e796ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func CSV(args ...string) ([][]string, error) {
// parameters:
//
// delim - (optional) the (single-character!) field delimiter, defaults to ","
// hdr - (optional) comma-separated list of column names,
// hdr - (optional) list of column names separated by `delim`,
// set to "" to get auto-named columns (A-Z), omit
// to use the first line
// in - the CSV-format string to parse
Expand All @@ -305,7 +305,7 @@ func CSVByRow(args ...string) (rows []map[string]string, err error) {
// parameters:
//
// delim - (optional) the (single-character!) field delimiter, defaults to ","
// hdr - (optional) comma-separated list of column names,
// hdr - (optional) list of column names separated by `delim`,
// set to "" to get auto-named columns (A-Z), omit
// to use the first line
// in - the CSV-format string to parse
Expand Down
4 changes: 2 additions & 2 deletions docs-src/content/functions/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ funcs:
description: the (single-character!) field delimiter, defaults to `","`
- name: header
required: false
description: comma-separated list of column names, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input`
description: list of column names separated by `delim`, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input`
- name: input
required: true
description: the CSV-format string to parse
Expand Down Expand Up @@ -347,7 +347,7 @@ funcs:
description: the (single-character!) field delimiter, defaults to `","`
- name: header
required: false
description: comma-separated list of column names, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input`
description: list of column names separated by `delim`, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input`
- name: input
required: true
description: the CSV-format string to parse
Expand Down
4 changes: 2 additions & 2 deletions docs/content/functions/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ input | data.CSVByRow [delim] [header]
| name | description |
|------|-------------|
| `delim` | _(optional)_ the (single-character!) field delimiter, defaults to `","` |
| `header` | _(optional)_ comma-separated list of column names, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input` |
| `header` | _(optional)_ list of column names separated by `delim`, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input` |
| `input` | _(required)_ the CSV-format string to parse |

### Examples
Expand Down Expand Up @@ -500,7 +500,7 @@ input | data.CSVByColumn [delim] [header]
| name | description |
|------|-------------|
| `delim` | _(optional)_ the (single-character!) field delimiter, defaults to `","` |
| `header` | _(optional)_ comma-separated list of column names, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input` |
| `header` | _(optional)_ list of column names separated by `delim`, set to `""` to get auto-named columns (A-Z), defaults to using the first line of `input` |
| `input` | _(required)_ the CSV-format string to parse |

### Examples
Expand Down

0 comments on commit 3e796ea

Please sign in to comment.