pritty

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bold = Attribute(iota + 1)
	Bright
	Italic
	Underscore
	Blink
	FastBlink
	Reverse
	Hidden
	Conceal
)
View Source
const (
	Black = Color(-1)
	Red   = Color(iota)
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute added in v1.1.1

type Attribute int

type Color added in v1.1.1

type Color int

type Printer

type Printer struct {
	IOStreams genericclioptions.IOStreams
	Color     bool
	TTY       bool
}

func (Printer) Sprint added in v1.1.1

func (p Printer) Sprint(ts *TextStyle) string

func (Printer) SprintHeader added in v1.1.1

func (p Printer) SprintHeader(text string) string

type TextStyle added in v1.1.1

type TextStyle struct {
	Text string
	// contains filtered or unexported fields
}

func Style added in v1.1.1

func Style(text string) *TextStyle

func (*TextStyle) Bg added in v1.1.1

func (s *TextStyle) Bg(color Color) *TextStyle

func (*TextStyle) Decorate added in v1.1.1

func (s *TextStyle) Decorate(at Attribute) *TextStyle

func (*TextStyle) Fg added in v1.1.1

func (s *TextStyle) Fg(color Color) *TextStyle

func (TextStyle) String added in v1.1.1

func (s TextStyle) String() string

Jump to

Keyboard shortcuts

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