output

package
v0.0.0-...-8ff1004 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CurrentHighlight = ansiterm.Foreground(ansiterm.Green)

CurrentHighlight is the color used to show the current controller, user or model in tabular

View Source
var DefaultFormatters = map[string]cmd.Formatter{
	"yaml": cmd.FormatYaml,
	"json": cmd.FormatJson,
}

DefaultFormatters holds the formatters that can be specified with the --format flag.

View Source
var ErrorHighlight = ansiterm.Foreground(ansiterm.Red)

ErrorHighlight is the color used to show error conditions.

GoodHighlight is used to indicate good or success conditions.

View Source
var WarningHighlight = ansiterm.Foreground(ansiterm.Yellow)

WarningHighlight is the color used to show warning conditions. Generally things that the user should be aware of, but not necessarily requiring any user action.

Functions

func TabWriter

func TabWriter(writer io.Writer) *ansiterm.TabWriter

TabWriter returns a new tab writer with common layout definition.

Types

type Wrapper

type Wrapper struct {
	*ansiterm.TabWriter
}

Wrapper provides some helper functions for writing values out tab separated.

func (*Wrapper) Print

func (w *Wrapper) Print(values ...interface{})

Print writes each value followed by a tab.

func (*Wrapper) PrintColor

func (w *Wrapper) PrintColor(ctx *ansiterm.Context, value interface{})

PrintColor writes the value out in the color context specified.

func (*Wrapper) PrintStatus

func (w *Wrapper) PrintStatus(status status.Status)

PrintStatus writes out the status value in the standard color.

func (*Wrapper) Printf

func (w *Wrapper) Printf(format string, values ...interface{})

Printf writes the formatted text followed by a tab.

func (*Wrapper) Println

func (w *Wrapper) Println(values ...interface{})

Println writes many tab separated values finished with a new line.

Jump to

Keyboard shortcuts

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