Versions in this module Expand all Collapse all v1 v1.4.0 Jul 29, 2024 Changes in this version + type Reader interface + GetHeaders func() []string + GetNextIndex func(currentIndex int, cycle bool) int + GetRow func(index int) (Row, bool) + GroupByColumnIndex func(columnIndex int) map[string][]Row + GroupByColumnIndexes func(columnIndexes ...int) map[string][]Row + GroupByColumnName func(columnName string) map[string][]Row + GroupByColumnNames func(columnNames ...string) map[string][]Row + Iterator func() RowIterator + RowToObjet func(index int, obj any) (bool, error) + SetHeader func(header []string) + ToObjects func(objs []any) error + TotalRows func() int + func NewCSVReader(r io.Reader, optFns ...func(*ReaderOptions)) (Reader, error) + func NewCSVReaderFromPath(path string, optFns ...func(*ReaderOptions)) (Reader, error) + type ReaderOptions struct + NoHeader bool + Separator ReaderSeparator + type ReaderSeparator rune + const CommaSeparator + const PipeSeparator + const SemicolonSeparator + const TabSeparator + func ToReaderSeparator(separator string) (ReaderSeparator, bool) + type Row interface + AsMap func() map[string]string + Fields func() []*RowField + LineNumber func() int + ToObject func(obj any) error + Value func(columnName string) (string, bool) + Values func() []string + type RowField struct + Name string + Value string + type RowIterator func(yield func(Row) bool)