uiutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 4 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 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

Jump to

Keyboard shortcuts

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