Documentation ¶
Index ¶
- Variables
- func AdvisoryColor(message string) string
- func Colorize(message string, color *color.Color) string
- func ColorsEnabled() bool
- func CommandColor(message string) string
- func CrashedColor(message string) string
- func Decolorize(message string) string
- func EntityNameColor(message string) string
- func FailureColor(message string) string
- func HeaderColor(message string) string
- func InitColorSupport()
- func LogAppHeaderColor(message string) string
- func LogHealthHeaderColor(message string) string
- func LogStderrColor(message string) string
- func LogStdoutColor(message string) string
- func LogSysHeaderColor(message string) string
- func PromptColor(message string) string
- func StoppedColor(message string) string
- func SuccessColor(message string) string
- func TableContentHeaderColor(message string) string
- func WarningColor(message string) string
- type KeyValueTable
- type Table
- type TerminalTable
- func (t *TerminalTable) Add(row ...string)
- func (t *TerminalTable) AddNestedTable(row ...interface{})
- func (t *TerminalTable) MarshalJSON() ([]byte, error)
- func (t *TerminalTable) Print()
- func (t *TerminalTable) PrintJson()
- func (t *TerminalTable) PrintKeyValueJson()
- func (t *TerminalTable) SetFormat(outFormat string)
- func (t *TerminalTable) SetOutput(writer io.Writer)
- func (t *TerminalTable) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Output = colorable.NewColorableStdout() ErrOutput = colorable.NewColorableStderr() TerminalSupportsColors = isTerminal() UserAskedForColors = "" )
Functions ¶
func AdvisoryColor ¶
func ColorsEnabled ¶
func ColorsEnabled() bool
func CommandColor ¶
func CrashedColor ¶
func Decolorize ¶
func EntityNameColor ¶
func FailureColor ¶
func HeaderColor ¶
func InitColorSupport ¶
func InitColorSupport()
func LogAppHeaderColor ¶
func LogHealthHeaderColor ¶
func LogStderrColor ¶
func LogStdoutColor ¶
func LogSysHeaderColor ¶
func PromptColor ¶
func StoppedColor ¶
func SuccessColor ¶
func TableContentHeaderColor ¶
func WarningColor ¶
Types ¶
type KeyValueTable ¶
type KeyValueTable struct {
*TerminalTable
}
func (*KeyValueTable) MarshalJSON ¶
func (t *KeyValueTable) MarshalJSON() ([]byte, error)
type Table ¶
type TerminalTable ¶
type TerminalTable struct {
// contains filtered or unexported fields
}
func (*TerminalTable) Add ¶
func (t *TerminalTable) Add(row ...string)
func (*TerminalTable) AddNestedTable ¶
func (t *TerminalTable) AddNestedTable(row ...interface{})
Used to convert a Row that has a table in it to a string row. I couldn't jsut change the Add function to be Add(row ...interface{}) because it would break users adding rows like in the TestEllipsisTable() unit test
func (*TerminalTable) MarshalJSON ¶
func (t *TerminalTable) MarshalJSON() ([]byte, error)
func (*TerminalTable) Print ¶
func (t *TerminalTable) Print()
func (*TerminalTable) PrintJson ¶
func (t *TerminalTable) PrintJson()
Prints out a nicely/human formatted Json string instead of a table structure
func (*TerminalTable) PrintKeyValueJson ¶
func (t *TerminalTable) PrintKeyValueJson()
func (*TerminalTable) SetFormat ¶
func (t *TerminalTable) SetFormat(outFormat string)
func (*TerminalTable) SetOutput ¶
func (t *TerminalTable) SetOutput(writer io.Writer)
func (*TerminalTable) String ¶
func (t *TerminalTable) String() string
Click to show internal directories.
Click to hide internal directories.