Documentation
¶
Index ¶
- Constants
- Variables
- func AdvisoryColor(message string) string
- func Colorize(message string, color Color) string
- func ColorizeBold(message string, color Color) string
- 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 LogStderrColor(message string) string
- func LogStdoutColor(message string) string
- func LogSysHeaderColor(message string) string
- func NotLoggedInText() 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 Color
- type ColoringFunction
- type DebugPrinter
- type PrintableTable
- type Table
- type UI
Constants ¶
View Source
const QuietPanic = "This shouldn't print anything"
Variables ¶
View Source
var (
OsSupportsColors = runtime.GOOS != "windows"
TerminalSupportsColors = isTerminal()
UserAskedForColors = ""
)
Functions ¶
func AdvisoryColor ¶
func AdvisoryColor(message string) 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 HeaderColor ¶
func HeaderColor(message string) string
func InitColorSupport ¶
func InitColorSupport()
func LogAppHeaderColor ¶
func LogAppHeaderColor(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 NotLoggedInText ¶
func NotLoggedInText() 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 ColoringFunction ¶
type ColoringFunction func(value string, row int, col int) string
type DebugPrinter ¶
type DebugPrinter struct{}
type PrintableTable ¶
type PrintableTable struct {
// contains filtered or unexported fields
}
type UI ¶
type UI interface {
PrintPaginator(rows []string, err error)
Say(message string, args ...interface{})
Warn(message string, args ...interface{})
Ask(prompt string, args ...interface{}) (answer string)
AskForPassword(prompt string, args ...interface{}) (answer string)
Confirm(message string, args ...interface{}) bool
ConfirmDelete(modelType, modelName string) bool
ConfirmDeleteWithAssociations(modelType, modelName string) bool
Ok()
Failed(message string, args ...interface{})
FailWithUsage(context *cli.Context)
PanicQuietly()
ShowConfiguration(configuration.Reader)
LoadingIndication()
Wait(duration time.Duration)
Table(headers []string) Table
}
Click to show internal directories.
Click to hide internal directories.