Documentation ¶
Index ¶
- func NewCol(i int, v string) *col
- func NewHeader(cap int) *header
- func NewRow(v []interface{}) *row
- func NewTable(cols ...string) data.Table
- type Table
- func (t *Table) Append(values ...interface{})
- func (t *Table) Col(i int) data.TableCol
- func (t *Table) Len() int
- func (t *Table) Less(i, j int) bool
- func (t *Table) OptAscii(width uint, border string) data.TableOpt
- func (t *Table) OptCsv(delim rune) data.TableOpt
- func (t *Table) OptDuration(dur time.Duration) data.TableOpt
- func (t *Table) OptHeader() data.TableOpt
- func (t *Table) OptRowIterator(fn data.IteratorFunc) data.TableOpt
- func (t *Table) OptSql(name string) data.TableOpt
- func (t *Table) OptTimezone(tz *time.Location) data.TableOpt
- func (t *Table) OptTransform(fns ...data.TransformFunc) data.TableOpt
- func (t *Table) OptType(types data.Type) data.TableOpt
- func (t *Table) Read(r io.Reader, opts ...data.TableOpt) error
- func (t *Table) Row(i int) []interface{}
- func (t *Table) Sort(fn data.CompareFunc)
- func (t *Table) String() string
- func (t *Table) Swap(i, j int)
- func (t *Table) Write(w io.Writer, opts ...data.TableOpt) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) OptHeader ¶
OptHeader on Read options ensures the first row read is the header for the CSV, on Write ensures the header is output before the first row
func (*Table) OptRowIterator ¶
func (t *Table) OptRowIterator(fn data.IteratorFunc) data.TableOpt
func (*Table) OptTransform ¶
func (t *Table) OptTransform(fns ...data.TransformFunc) data.TableOpt
func (*Table) Sort ¶
func (t *Table) Sort(fn data.CompareFunc)
Sort does a quicksort on the table using a comparison function
Click to show internal directories.
Click to hide internal directories.