Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnexpectedHeaderRowContents = errors.New("header row values do not match expectations") ErrBadRecordSeparator = errors.New("record separator can only be one rune long or \"\r\n\"") ErrIncompleteQuotedField = fmt.Errorf("incomplete quoted field: %w", UnexpectedEOFError{}) ErrUnexpectedEndOfEscapeSequence = fmt.Errorf("expecting an escaped character in a quoted field: %w", UnexpectedEOFError{}) ErrBadEscapeSequence = errors.New("found escape character not followed by a quote or another escape character") ErrBadEscapeAtStartOfRecord = errors.New("escape character found outside the context of a quoted field when expecting the start of a record") ErrBadEscapeAtStartOfField = errors.New("escape character found outside the context of a quoted field when expecting the start of a field") ErrBadEscapeInUnquotedField = errors.New("escape character found outside the context of a quoted field when processing an unquoted field") ErrInvalidQuotedFieldEnding = errors.New("unexpected character found after end of quoted field") // expecting field separator, record separator, quote char, or end of file if field count matches expectations ErrNoHeaderRow = fmt.Errorf("no header row: %w", UnexpectedEOFError{}) ErrNoRows = fmt.Errorf("no rows: %w", UnexpectedEOFError{}) // config errors ErrNilReader = errors.New("nil reader") )
Functions ¶
func ReaderOpts ¶
func ReaderOpts() readerOpts
Types ¶
type ConfigurationError ¶
type ConfigurationError struct {
// contains filtered or unexported fields
}
func (ConfigurationError) Error ¶
func (e ConfigurationError) Error() string
func (ConfigurationError) Unwrap ¶
func (e ConfigurationError) Unwrap() error
type ErrFieldCountMismatch ¶
type ErrFieldCountMismatch struct {
// contains filtered or unexported fields
}
func (ErrFieldCountMismatch) Error ¶
func (e ErrFieldCountMismatch) Error() string
type ErrTooManyFields ¶
type ErrTooManyFields struct {
// contains filtered or unexported fields
}
func (ErrTooManyFields) Error ¶
func (e ErrTooManyFields) Error() string
type ParsingError ¶
type ParsingError struct {
// contains filtered or unexported fields
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(options ...ReaderOption) (*Reader, error)
func (*Reader) Row ¶
Row returns a slice of strings that represents a row of a dataset.
Row only returns valid results after a call to Scan() return true. For efficiency reasons this method should not be called more than once between calls to Scan().
If the reader is configured with BorrowRow(true) then the resulting slice and field strings are only valid to use up until the next call to Scan and should not be saved to persistent memory.
type ReaderOption ¶
type ReaderOption func(*rCfg)
type UnexpectedEOFError ¶
type UnexpectedEOFError struct{}
func (UnexpectedEOFError) Error ¶
func (e UnexpectedEOFError) Error() string
Click to show internal directories.
Click to hide internal directories.