Documentation
¶
Index ¶
- Variables
- func Colorize(str, colorKey string) string
- func Fg(colorKey string) string
- func HPrint(level PrintType, v ...interface{})
- func HPrintf(level PrintType, format string, v ...interface{})
- func HPrintln(level PrintType, v ...interface{})
- func IsTty() bool
- func LHPrint(level PrintType, humanOnly bool, v ...interface{})
- func LHPrintf(level PrintType, humanOnly bool, format string, v ...interface{})
- func LHPrintln(level PrintType, humanOnly bool, v ...interface{})
- func LPrint(level PrintType, v ...interface{})
- func LPrintf(level PrintType, format string, v ...interface{})
- func LPrintln(level PrintType, v ...interface{})
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func Reset() string
- type PrintLevel
- type PrintType
- type Printer
- type PrinterWrapper
- type ProgressPrinter
- type Styler
- func (s *Styler) Bold() *Styler
- func (s *Styler) Codes() string
- func (s *Styler) FgCyan() *Styler
- func (s *Styler) FgGreen() *Styler
- func (s *Styler) FgMagenta() *Styler
- func (s *Styler) FgRed() *Styler
- func (s *Styler) FgYellow() *Styler
- func (s *Styler) Normal() *Styler
- func (s *Styler) On(str string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors map[string]string
View Source
var DebugMode = false
View Source
var NoHumanOnly = false
View Source
var StderrLog = log.New(os.Stderr, "", 0)
Functions ¶
Types ¶
type PrintLevel ¶
type PrintLevel int
const ( AlwaysLevel PrintLevel = iota QuietableLevel VerboseLevel )
var LevelEnabled PrintLevel = QuietableLevel
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
var Deb Printer
var Quiet Printer
var Verb Printer
type PrinterWrapper ¶
var Hum PrinterWrapper
type ProgressPrinter ¶
type ProgressPrinter struct {
// contains filtered or unexported fields
}
func NewProgressPrinter ¶
func NewProgressPrinter(total int) *ProgressPrinter
func (*ProgressPrinter) Progress ¶
func (p *ProgressPrinter) Progress(n int)
n: The number of units to increment.
Click to show internal directories.
Click to hide internal directories.