util

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OsSupportsColors       = runtime.GOOS != "windows"
	TerminalSupportsColors = isTerminal()
	UserAskedForColors     = ""
)

Functions

func AdvisoryColor

func AdvisoryColor(message string) string

func Colorize

func Colorize(message string, color Color) string

func ColorizeBold

func ColorizeBold(message string, color Color) string

func CommandColor

func CommandColor(message string) string

func CrashedColor

func CrashedColor(message string) string

func Decolorize

func Decolorize(message string) string

func EntityNameColor

func EntityNameColor(message string) string

func FailureColor

func FailureColor(message string) string

func FreakOut

func FreakOut(err error)

func HeaderColor

func HeaderColor(message string) string

func InitColorSupport

func InitColorSupport()

func LogAppHeaderColor

func LogAppHeaderColor(message string) string

func LogHealthHeaderColor

func LogHealthHeaderColor(message string) string

func LogStderrColor

func LogStderrColor(message string) string

func LogStdoutColor

func LogStdoutColor(message string) string

func LogSysHeaderColor

func LogSysHeaderColor(message string) string

func Poll

func Poll(cliConnection plugin.CliConnection, endpoint string, desired string, timeout time.Duration, timeoutMessage string)

func PromptColor

func PromptColor(message string) string

func StoppedColor

func StoppedColor(message string) string

func SuccessColor

func SuccessColor(message string) string

func TableContentHeaderColor

func TableContentHeaderColor(message string) string

func WarningColor

func WarningColor(message string) string

Types

type Color

type Color uint

type PrintableTable

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

func (*PrintableTable) Add

func (t *PrintableTable) Add(row ...string)

func (*PrintableTable) Print

func (t *PrintableTable) Print()

type Table

type Table interface {
	Add(row ...string)
	Print()
}

func NewTable

func NewTable(headers []string) Table

Jump to

Keyboard shortcuts

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