Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetFieldNames ¶
GetFieldNames returns a string array of the given interface's field names if the given interface is a struct or slice of structs
Types ¶
type Reader ¶
Reader wraps the csv.Reader and adds a map of csv struct tags.
func (*Reader) Unmarshal ¶
Unmarshal reads the entire Reader into the given destination. The destination interface must of pointer of type slice.
func (*Reader) UnmarshalOne ¶
UnmarshalOne reads a single row of the Reader into the given struct. The destination interface must of pointer of type struct.
type Writer ¶
Writer wraps the csv.Writer and adds a map of csv struct tags.
func (*Writer) Marshal ¶
Marshal writes a slice of structs to the Writer. The destination interface must of pointer of type slice.
func (*Writer) WriteHeader ¶
WriteHeader will write the names of the underlying struct fields as a row. It accepts a struct or a slice of structs.