README

gocui table

Expand ▾ Collapse ▴

Documentation

Index

Constants

View Source
const (
	// AlignLeft int
	AlignLeft = Align(iota)
	// AlignRight int
	AlignRight
	// AlignCenter int
	AlignCenter
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align int

    Align int

    type Col

    type Col struct {
    	// contains filtered or unexported fields
    }

      Col struct

      func (*Col) AlignCenter

      func (c *Col) AlignCenter() *Col

        AlignCenter align center

        func (*Col) AlignLeft

        func (c *Col) AlignLeft() *Col

          AlignLeft align left

          func (*Col) AlignRight

          func (c *Col) AlignRight() *Col

            AlignRight align right

            func (*Col) Hide

            func (c *Col) Hide() *Col

              Hide hide

              func (*Col) SetFormat

              func (c *Col) SetFormat(f string) *Col

                SetFormat sets format

                func (*Col) SetFormatFn

                func (c *Col) SetFormatFn(f FormatFn) *Col

                  SetFormatFn set format function

                  func (*Col) SetWidth

                  func (c *Col) SetWidth(w int) *Col

                    SetWidth set width

                    func (*Col) SetWidthPerc

                    func (c *Col) SetWidthPerc(w int) *Col

                      SetWidthPerc set width percentage

                      type Cols

                      type Cols []*Col

                        Cols columns

                        func (Cols) Index

                        func (c Cols) Index(n string) int

                          Index index

                          type FormatFn

                          type FormatFn func(interface{}) string

                            FormatFn format function

                            type Row

                            type Row struct {
                            	// contains filtered or unexported fields
                            }

                              Row row

                              type Rows

                              type Rows []*Row

                                Rows rows

                                func (Rows) Len

                                func (r Rows) Len() int

                                  Len count

                                  func (Rows) Less

                                  func (r Rows) Less(i, j int) bool

                                    Less less

                                    func (Rows) Swap

                                    func (r Rows) Swap(i, j int)

                                      Swap swap rows

                                      type SortBy

                                      type SortBy struct {
                                      	// contains filtered or unexported fields
                                      }

                                        SortBy sort by

                                        type SortFn

                                        type SortFn func(interface{}, interface{}) bool

                                          SortFn sort function

                                          type SortOrder

                                          type SortOrder int

                                            SortOrder int

                                            const (
                                            	// SortNone sort none
                                            	SortNone SortOrder = iota
                                            	// SortAsc sort ascendinge
                                            	SortAsc
                                            	// SortDesc sort descending
                                            	SortDesc
                                            )

                                            type Table

                                            type Table struct {
                                            	HideColumHeaders bool
                                            	// contains filtered or unexported fields
                                            }

                                              Table table

                                              func New

                                              func New() *Table

                                                New new table

                                                func (*Table) AddCol

                                                func (t *Table) AddCol(n string) *Col

                                                  AddCol add column

                                                  func (*Table) AddRow

                                                  func (t *Table) AddRow(v ...interface{}) *Row

                                                    AddRow add row

                                                    func (*Table) Format

                                                    func (t *Table) Format() *Table

                                                      Format format table

                                                      func (*Table) Fprint

                                                      func (t *Table) Fprint(w io.Writer)

                                                        Fprint write

                                                        func (*Table) SetWidth

                                                        func (t *Table) SetWidth(w int) *Table

                                                          SetWidth set table width

                                                          func (*Table) Sort

                                                          func (t *Table) Sort() *Table

                                                            Sort sort

                                                            func (*Table) SortAsc

                                                            func (t *Table) SortAsc(n string) *Table

                                                              SortAsc sort ascending

                                                              func (*Table) SortAscFn

                                                              func (t *Table) SortAscFn(n string, fn SortFn) *Table

                                                                SortAscFn sort ascending function

                                                                func (*Table) SortDesc

                                                                func (t *Table) SortDesc(n string) *Table

                                                                  SortDesc sort descending

                                                                  func (*Table) SortDescFn

                                                                  func (t *Table) SortDescFn(n string, fn SortFn) *Table

                                                                    SortDescFn sort descending function

                                                                    Directories

                                                                    Path Synopsis