Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dump ¶
Dump - writes a slice content into an io.Writer @param slice: an object typically of the form []struct, where the struct using csv tags @param writer: the location of where you will write the slice content to. Example: File, Stdout, etc @return an error if one occures
func DumpToFile ¶
DumpToFile - writes a slice content into a file specified by filePath @param slice: An object typically of the form []struct, where the struct using csv tag @param filePath: The file path string of where you want the file to be created @return an error if one occures
func Load ¶
Load - Load a csv file and put it in a array of the dest type This uses tags Example:
tabT := []Test{} err := Load(Config{ Path: "csv_files/valid.csv", Dest: &tabT, Separator: ';', Header: []string{"header1", "header2", "header3"} })
The 'separator' and 'header' properties of the config object are optionals @param dest: object where to store the result @return an error if one occurs