uiutil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Out = os.Stdout

Out is the default out

View Source
var TitleUnderliner = "="

TitleUnderliner is the underline character for the title

Functions

This section is empty.

Types

type Component

type Component interface {
	Bytes() []byte
}

Component in the interface that UI components need to implement

type ListTable added in v0.4.3

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

func NewListTable added in v0.4.3

func NewListTable() *ListTable

func (*ListTable) AddHeader added in v0.4.3

func (t *ListTable) AddHeader(header ...string) *ListTable

func (*ListTable) AddRow added in v0.4.3

func (t *ListTable) AddRow(row ...interface{}) *ListTable

func (*ListTable) UITable added in v0.4.3

func (t *ListTable) UITable() *uitable.Table

type Printer

type Printer interface {
	Component
	AddTitle(string) Printer
	Add(Component) Printer
	Flush() error
}

func NewPrinter

func NewPrinter(out io.Writer) Printer

NewPrinter returns a pointer to a new printer object

type Title

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

Title is a UI component that renders a title. Title implements Component interface.

func NewTitle

func NewTitle(text string) *Title

func (*Title) Bytes

func (t *Title) Bytes() []byte

String returns the formated string of the title

func (*Title) String

func (t *Title) String() string

func (*Title) WithUnderliner added in v0.4.3

func (t *Title) WithUnderliner(u string) *Title

Jump to

Keyboard shortcuts

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