var (
ErrCSVNotSlice = errors.New("data is not a slice")
ErrCSVNotSliceOfStructs = errors.New("slice elements are not structs")
ErrCSVWriteFailed = errors.New("failed to write")
)
func SliceOfStructsToCSV(w io.Writer, data interface{}) error
SliceOfStructsToCSV writes a slice of structs to a CSV writer using struct
field names as headers. This function assumes that the data provided is
a slice of structs.