Documentation ¶
Index ¶
- type CsvStructure
- func (cs *CsvStructure) FormatRawRow(row string) (outSlice []string, err error)
- func (cs *CsvStructure) Read(filename string, autoOptions bool) (err error)
- func (cs *CsvStructure) ReadRawData(filename string, autoOptions bool) (err error)
- func (cs *CsvStructure) Save(filename string, doBackup bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsvStructure ¶
type CsvStructure struct { // Public Ready bool // true when csv data are present. Loaded bool // true when loaded successfully. Comma rune Comment rune RowWithColName int LazyQuotes bool FieldsPerRecord int TrimLeadingSpace bool UseCRLF bool Charset string KeepOriginalCharset bool CsvLines [][]string RawData []string // contains filtered or unexported fields }
func CsvStructureNew ¶
func CsvStructureNew() *CsvStructure
func (*CsvStructure) FormatRawRow ¶
func (cs *CsvStructure) FormatRawRow(row string) (outSlice []string, err error)
FormatRow: Formatting a Raw line to csv compliant. (usually used to preview column name)
func (*CsvStructure) Read ¶
func (cs *CsvStructure) Read(filename string, autoOptions bool) (err error)
Read: open a reader and read entire file to memory and store datas into CsvStructure
func (*CsvStructure) ReadRawData ¶
func (cs *CsvStructure) ReadRawData(filename string, autoOptions bool) (err error)
ReadRawData: Open CSV file as raw data (without csv formatting).
Click to show internal directories.
Click to hide internal directories.