Documentation
¶
Index ¶
- Variables
- func Colorize(msg string, color string) string
- func DebugMessage(msg string) string
- func DetailMessage(msg string) string
- func ErrorMessage(msg string) string
- func FormatTitle(title string, width int, color string) string
- func InfoMessage(msg string) string
- func PrintProgress(current, total int, width int, color string) string
- func SuccessMessage(msg string) string
- func WarningMessage(msg string) string
- type FunctionOutput
- type Manager
- func (m *Manager) AddStreamLine(name, line string)
- func (m *Manager) ClearFunction(name string)
- func (m *Manager) ClearLines(n int)
- func (m *Manager) ClearOutput()
- func (m *Manager) Complete(name string)
- func (m *Manager) Display()
- func (m *Manager) DisplayTable(name string, innerDividers bool)
- func (m *Manager) GetStatus(name string) string
- func (m *Manager) GetStatusDisplay(status string) string
- func (m *Manager) GetTable(name string) *Table
- func (m *Manager) Register(name string)
- func (m *Manager) RegisterTable(name string, headers []string) *Table
- func (m *Manager) Remove(name string)
- func (m *Manager) RemoveCompleted()
- func (m *Manager) RemoveTable(name string)
- func (m *Manager) ReportError(name string, err error)
- func (m *Manager) SetMessage(name, message string)
- func (m *Manager) SetStatus(name, status string)
- func (m *Manager) UpdateStreamOutput(name string, output []string)
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = map[string]string{
"red": "\033[31m",
"green": "\033[32m",
"yellow": "\033[33m",
"blue": "\033[34m",
"purple": "\033[35m",
"cyan": "\033[36m",
"white": "\033[37m",
"black": "\033[30m",
"grey": "\033[90m",
"brightRed": "\033[91m",
"brightGreen": "\033[92m",
"brightYellow": "\033[93m",
"brightBlue": "\033[94m",
"brightPurple": "\033[95m",
"brightCyan": "\033[96m",
"brightWhite": "\033[97m",
"bgRed": "\033[41m",
"bgGreen": "\033[42m",
"bgYellow": "\033[43m",
"bgBlue": "\033[44m",
"bgPurple": "\033[45m",
"bgCyan": "\033[46m",
"bgWhite": "\033[47m",
"bgBlack": "\033[40m",
"bgGrey": "\033[100m",
"bgBrightRed": "\033[101m",
"bgBrightGreen": "\033[102m",
"bgBrightYellow": "\033[103m",
"bgBrightBlue": "\033[104m",
"bgBrightPurple": "\033[105m",
"bgBrightCyan": "\033[106m",
"bgBrightWhite": "\033[107m",
"bold": "\033[1m",
"dim": "\033[2m",
"italic": "\033[3m",
"underline": "\033[4m",
"blink": "\033[5m",
"reset": "\033[0m",
"pass": "✓",
"fail": "✗",
}
Functions ¶
func DebugMessage ¶
func DetailMessage ¶
func ErrorMessage ¶
func FormatTitle ¶
Creates a title with formatting
func InfoMessage ¶
func PrintProgress ¶
Prints a simple progress bar
func WarningMessage ¶
Types ¶
type FunctionOutput ¶
type FunctionOutput struct {
Name string
Status string
Message string
StreamLines []string
Complete bool
}
Output of a function
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Output manager
func (*Manager) AddStreamLine ¶
Adds a single line to a function's stream output
func (*Manager) ClearFunction ¶ added in v0.6.4
Clears the output of a specific function
func (*Manager) DisplayTable ¶
Displays a specific table
func (*Manager) GetStatusDisplay ¶
Returns a colored status indicator based on status
func (*Manager) RegisterTable ¶
Adds a table to the manager
func (*Manager) RemoveCompleted ¶
func (m *Manager) RemoveCompleted()
Removes completed functions from the manager
func (*Manager) RemoveTable ¶
Removes a table from the manager
func (*Manager) ReportError ¶
Sets a function's status to error
func (*Manager) SetMessage ¶
Sets the primary message for a function
func (*Manager) UpdateStreamOutput ¶
Adds lines to a function's stream output
type Table ¶
func (*Table) FormatMarkdownTable ¶
func (*Table) FormatTable ¶
func (*Table) PrintMarkdownTable ¶
func (t *Table) PrintMarkdownTable()
func (*Table) PrintTable ¶
func (*Table) WriteMarkdownTableToFile ¶
Click to show internal directories.
Click to hide internal directories.