Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Path to the CSV file.
Path string
// Headers are the names of fields in the CSV file.
Headers []string
// ColSep is the delimiter character used in the CSV file.
ColSep rune
// FieldsNum is the expected number of fields in each row.
FieldsNum int
// BadRowMode specifies how to handle rows with an incorrect
// number of fields. Options include processing, ignoring, or
// raising an error (default).
BadRowMode gnfmt.BadRow
}
Config provides settings for processing CSV data, including file path, headers, delimiter, field count, and bad row handling mode.
type Option ¶
type Option func(*Config)
Option is a function that modifies a Config.
func OptBadRowMode ¶
OptBadRowMode sets the BadRowMode field of the Config.
func OptFieldsNum ¶
OptFieldsNum sets the FieldsNum field of the Config.
func OptHeaders ¶
OptHeaders sets the Headers field of the Config.
Click to show internal directories.
Click to hide internal directories.