Versions in this module Expand all Collapse all v0 v0.0.1 Sep 19, 2022 Changes in this version + var ErrEmptySlice = errors.New("struct2csv: the slice of structs was empty") + var ErrNilSlice = errors.New("struct2csv: the slice of structs was nil") + type Encoder struct + func New() *Encoder + func (e *Encoder) ColNames() []string + func (e *Encoder) GetColNames(v interface{}) ([]string, error) + func (e *Encoder) GetRow(v interface{}) ([]string, error) + func (e *Encoder) Marshal(v interface{}) ([][]string, error) + func (e *Encoder) SetBase(i int) + func (e *Encoder) SetSeparators(beg, end string) + func (e *Encoder) SetTag(s string) + func (e *Encoder) SetUseTags(b bool) + type StructRequiredError struct + func (e StructRequiredError) Error() string + type StructSliceError struct + func (e StructSliceError) Error() string + type Writer struct + func NewWriter(w io.Writer) *Writer + func (w *Writer) ColNames() []string + func (w *Writer) Comma() rune + func (w *Writer) Error() error + func (w *Writer) Flush() + func (w *Writer) Rows() int + func (w *Writer) SetBase(i int) + func (w *Writer) SetComma(r rune) + func (w *Writer) SetSeparators(beg, end string) + func (w *Writer) SetTag(s string) + func (w *Writer) SetUseCRLF(b bool) + func (w *Writer) SetUseTags(b bool) + func (w *Writer) UseCRLF() bool + func (w *Writer) Write(row []string) error + func (w *Writer) WriteAll(data [][]string) error + func (w *Writer) WriteColNames(st interface{}) error + func (w *Writer) WriteStruct(st interface{}) error + func (w *Writer) WriteStructs(st interface{}) error