Documentation
¶
Index ¶
- Constants
- func NewContext(ctx context.Context, p *Printer) context.Context
- type Printer
- func (p *Printer) Bold(text string) string
- func (p *Printer) Errorf(format string, args ...interface{})
- func (p *Printer) FatalError(err error)
- func (p *Printer) Infof(format string, args ...interface{})
- func (p *Printer) Printlnf(format string, args ...interface{})
- func (p *Printer) Successf(format string, args ...interface{})
Constants ¶
View Source
const ( ColorReset = "\033[0m" ColorRed = "\033[38;2;215;95;107m" // #d75f6b ColorGreen = "\033[38;2;34;197;94m" // #22c55e ColorGray = "\033[38;2;163;163;163m" // #a3a3a3 ColorBold = "\033[1m" )
ANSI color codes
View Source
const ( Check = "✔" Cross = "✘" Folder = "" Dot = "•" )
Symbols
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer handles formatted output with colors and styles
func (*Printer) FatalError ¶
FatalError prints a formatted error box and does NOT exit Caller should handle exit code
Click to show internal directories.
Click to hide internal directories.