Documentation ¶
Overview ¶
This library can dump slice , array and etc to CSV files.
Index ¶
Constants ¶
View Source
const ( XSLX int = 10 << iota CSV )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dumper ¶
type Dumper struct { Header []string Type interface{} Body [][]string // contains filtered or unexported fields }
Dumper , This struct contains Header , Type and Body. Header is header of CSV file. Body is 2D array for the body of CSV file. And Type is the type of interface which you want to dump.
func New ¶
New , This method return an error only if
Invalid input, input must be a struct
And return the Dumper struct as base of this library. The input must be a struct.
Todo : allow method to receive map values.
func (*Dumper) Dump ¶
Dump This method return error if :
index out of range (body must be a child of header) not struct input for body input was not a slice or array
And after called , the body is ready for save or something else...
func (*Dumper) DumpAndSave ¶
DumpAndSave This method return error if :
index out of range (body must be a child of header) not struct input for body input was not a slice or array
And after called , the body is ready for save or something else...
Click to show internal directories.
Click to hide internal directories.