Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Blue = makeColorFunc("blue")
Blue outputs ANSI color if stdout is a tty
View Source
var Bold = makeColorFunc("default+b")
Bold outputs ANSI color if stdout is a tty
View Source
var Cyan = makeColorFunc("cyan")
Cyan outputs ANSI color if stdout is a tty
View Source
var Gray = makeColorFunc("black+h")
Gray outputs ANSI color if stdout is a tty
View Source
var Green = makeColorFunc("green")
Green outputs ANSI color if stdout is a tty
View Source
var Magenta = makeColorFunc("magenta")
Magenta outputs ANSI color if stdout is a tty
View Source
var PrepareCmd = func(cmd *exec.Cmd) Runnable {
return &cmdWithStderr{cmd}
}
PrepareCmd extends exec.Cmd with extra error reporting features and provides a hook to stub command execution in tests
View Source
var Red = makeColorFunc("red")
Red outputs ANSI color if stdout is a tty
View Source
var Yellow = makeColorFunc("yellow")
Yellow outputs ANSI color if stdout is a tty
Functions ¶
func NewColorable ¶
NewColorable returns an output stream that handles ANSI color sequences on Windows
func OpenInBrowser ¶
func RenderMarkdown ¶
func SetPrepareCmd ¶
SetPrepareCmd overrides PrepareCmd and returns a func to revert it back
Types ¶
type TablePrinter ¶
type TablePrinter interface {
IsTTY() bool
AddField(string, func(int, string) string, func(string) string)
EndRow()
Render() error
}
func NewTablePrinter ¶
func NewTablePrinter(w io.Writer) TablePrinter
Click to show internal directories.
Click to hide internal directories.