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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
apply suggested edits to remaining files
giorgiga committed Apr 16, 2023
commit b0269606cb9c298d2362e064246e6c69e1cf7946
2 changes: 1 addition & 1 deletion data/data.go
Original file line number Diff line number Diff line change
@@ -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) character-separated list of column names using delim as separator,
// 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
2 changes: 1 addition & 1 deletion docs-src/content/functions/data.yml
Original file line number Diff line number Diff line change
@@ -347,7 +347,7 @@ funcs:
description: the (single-character!) field delimiter, defaults to `","`
- name: header
required: false
description: character-separated list of column names using delim as separator, 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
4 changes: 2 additions & 2 deletions docs/content/functions/data.md
Original file line number Diff line number Diff line change
@@ -456,7 +456,7 @@ input | data.CSVByRow [delim] [header]
| name | description |
|------|-------------|
| `delim` | _(optional)_ the (single-character!) field delimiter, defaults to `","` |
| `header` | _(optional)_ character-separated list of column names using delim as separator, 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
@@ -500,7 +500,7 @@ input | data.CSVByColumn [delim] [header]
| name | description |
|------|-------------|
| `delim` | _(optional)_ the (single-character!) field delimiter, defaults to `","` |
| `header` | _(optional)_ character-separated list of column names using delim as separator, 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