display

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: GPL-3.0 Imports: 4 Imported by: 2 modules, 14 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ErrNilDisplayByteSliceHandler = errors.New("nil display byte slice handler")

ErrNilDisplayByteSliceHandler signals that a nil display byte slice handler 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

func Headline

func Headline(message string, timestamp string, delimiter string) string

Headline will build a headline message given a delimiter string

timestamp parameter will be printed before the repeating delimiter

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