display

package
v1.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySlices = errors.New("empty slices")

ErrEmptySlices signals that empty slices has been provided

View Source
var ErrNilDataLines = errors.New("nil lineData slice")

ErrNilDataLines signals that a nil data lines slice has been provided

View Source
var ErrNilHeader = errors.New("nil header")

ErrNilHeader signals that a nil header slice has been provided

View Source
var ErrNilLineDataInSlice = errors.New("nil line data element found in slice")

ErrNilLineDataInSlice signals that a nil line data element was found in slice

View Source
var ErrNilValuesOfLineDataInSlice = errors.New("nil line data values slice found")

ErrNilValuesOfLineDataInSlice signals that a line data element has nil values

Functions

func CreateTableString

func CreateTableString(header []string, data []*LineData) (string, error)

CreateTableString creates an ASCII table having header as table header and a LineData slice as table rows It automatically resize itself based on the lengths of every cell

Types

type LineData

type LineData struct {
	Values              []string
	HorizontalRuleAfter bool
}

LineData represents a displayable table line

func NewLineData

func NewLineData(horizontalRuleAfter bool, values []string) *LineData

NewLineData creates a new LineData object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL