Documentation ¶
Index ¶
- Variables
- func FormatTable(t table.Table)
- type ColorFormatter
- func (c *ColorFormatter) Bold(s string) string
- func (c *ColorFormatter) Cyan(s string) string
- func (c *ColorFormatter) Green(s string) string
- func (c *ColorFormatter) GreenBg(s string) string
- func (c *ColorFormatter) Red(s string) string
- func (c *ColorFormatter) RedBg(s string) string
- func (c *ColorFormatter) Yellow(s string) string
- type ColorMode
- type Prompter
Constants ¶
This section is empty.
Variables ¶
View Source
var Color string
Color represents the coloring mode.
Functions ¶
Types ¶
type ColorFormatter ¶
type ColorFormatter struct {
// contains filtered or unexported fields
}
ColorFormatter is a string formatter with color.
func (*ColorFormatter) Bold ¶
func (c *ColorFormatter) Bold(s string) string
Bold returns bold decorated string.
func (*ColorFormatter) Cyan ¶
func (c *ColorFormatter) Cyan(s string) string
Cyan returns cyan-colored string.
func (*ColorFormatter) Green ¶
func (c *ColorFormatter) Green(s string) string
Green returns green-colored string.
func (*ColorFormatter) GreenBg ¶
func (c *ColorFormatter) GreenBg(s string) string
GreenBg returns string with green background.
func (*ColorFormatter) Red ¶
func (c *ColorFormatter) Red(s string) string
Red returns red-colored string.
func (*ColorFormatter) RedBg ¶
func (c *ColorFormatter) RedBg(s string) string
RedBg returns string with red background.
func (*ColorFormatter) Yellow ¶
func (c *ColorFormatter) Yellow(s string) string
Yellow returns yellow-colored string.
type Prompter ¶
type Prompter interface { Ask(q survey.Prompt, response interface{}, opts ...survey.AskOpt) error Printf(format string, a ...any) Println(a ...any) Warn(msg string) Error(msg string) Done(msg string) StartSpinner(msg string, newline bool) *spinner.Spinner ColorFormatter() *ColorFormatter }
Prompter is an interface that provides functions for the prompt.
Click to show internal directories.
Click to hide internal directories.