Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarified documentation of data.CSVBy* functions #1714

Merged
merged 5 commits into from
Apr 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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