Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapCSVHeaders ¶
MapCSVHeaders creates a map of headers[i] -> fields[i].
func ParseKeyValuePairs ¶
ParseKeyValuePairs will split each string in `pairs` on the `delimiter` into a key and value string that get added to a map and returned.
func ReadCSVRow ¶
ReadCSVRow reads a CSV row from the csv reader, returning the fields parsed from the line. We make the assumption that the payload we are reading is a single row, so we allow newline characters in fields. However, the csv package does not support newlines in a CSV field (it assumes rows are newline separated), so in order to support parsing newlines in a field, we need to stitch together the results of multiple Read calls.
func SplitString ¶
SplitString will split the input on the delimiter and return the resulting slice while respecting quotes. Outer quotes are stripped. Use in place of `strings.Split` when quotes need to be respected. Requires `delimiter` not be an empty string
Types ¶
This section is empty.