Documentation ¶
Index ¶
- Variables
- func Ask(msg ...string) error
- func AutoApprove() bool
- func Debug() bool
- func HasColor() bool
- func Print(level Level, msg ...any)
- func PrintBlockE(errs ...error)
- func Printf(level Level, format string, args ...any)
- func Println(level Level, msg ...any)
- func Streams() streams.Streams
- type Block
- type Color
- type Content
- type ErrorBlock
- type Level
- type Lines
- type Ui
- type UiMock
- type UiOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = struct { NONE Color RESET Color GREEN Color RED Color YELLOW Color BLUE Color }{ NONE: colorNone, RESET: color.New(color.Reset).SprintFunc(), GREEN: color.New(color.FgHiGreen).SprintFunc(), RED: color.New(color.FgHiRed).SprintFunc(), YELLOW: color.New(color.FgHiYellow).SprintFunc(), BLUE: color.New(color.FgHiCyan).SprintFunc(), }
Functions ¶
func AutoApprove ¶
func AutoApprove() bool
func PrintBlockE ¶
func PrintBlockE(errs ...error)
Types ¶
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
func NewErrorLine ¶
NewErrorLine contains a title and lines to be printed within a block. When formatted, a colored title is printed in the same line as title.
func NewErrorSection ¶
NewErrorSection contains a title and lines to be printed within a block. When formatted, a colored title and lines are printed each in a new line. Lines are also additionally indented.
type ErrorBlock ¶
func NewErrorBlock ¶
func NewErrorBlock(level Level, content []Content) ErrorBlock
type Lines ¶
type Lines []string
type Ui ¶
Click to show internal directories.
Click to hide internal directories.