Documentation
¶
Index ¶
- Variables
- func BluePrint(a ...interface{})
- func BluePrintf(format string, a ...interface{})
- func BluePrintln(a ...interface{})
- func BlueUnderlinePrint(a ...interface{})
- func BlueUnderlinePrintf(format string, a ...interface{})
- func BlueUnderlinePrintln(a ...interface{})
- func BoldPrint(a ...interface{})
- func BoldPrintf(format string, a ...interface{})
- func BoldPrintln(a ...interface{})
- func BoldUnderlinePrint(a ...interface{})
- func BoldUnderlinePrintf(format string, a ...interface{})
- func BoldUnderlinePrintln(a ...interface{})
- func CyanPrint(a ...interface{})
- func CyanPrintf(format string, a ...interface{})
- func CyanPrintln(a ...interface{})
- func CyanUnderlinePrint(a ...interface{})
- func CyanUnderlinePrintf(format string, a ...interface{})
- func CyanUnderlinePrintln(a ...interface{})
- func EBluePrint(a ...interface{})
- func EBluePrintf(format string, a ...interface{})
- func EBluePrintln(a ...interface{})
- func EBlueUnderlinePrint(a ...interface{})
- func EBlueUnderlinePrintf(format string, a ...interface{})
- func EBlueUnderlinePrintln(a ...interface{})
- func EBoldPrint(a ...interface{})
- func EBoldPrintf(format string, a ...interface{})
- func EBoldPrintln(a ...interface{})
- func EBoldUnderlinePrint(a ...interface{})
- func EBoldUnderlinePrintf(format string, a ...interface{})
- func EBoldUnderlinePrintln(a ...interface{})
- func ECyanPrint(a ...interface{})
- func ECyanPrintf(format string, a ...interface{})
- func ECyanPrintln(a ...interface{})
- func ECyanUnderlinePrint(a ...interface{})
- func ECyanUnderlinePrintf(format string, a ...interface{})
- func ECyanUnderlinePrintln(a ...interface{})
- func EGreenPrint(a ...interface{})
- func EGreenPrintf(format string, a ...interface{})
- func EGreenPrintln(a ...interface{})
- func EGreenUnderlinePrint(a ...interface{})
- func EGreenUnderlinePrintf(format string, a ...interface{})
- func EGreenUnderlinePrintln(a ...interface{})
- func EItalicPrint(a ...interface{})
- func EItalicPrintf(format string, a ...interface{})
- func EItalicPrintln(a ...interface{})
- func EPrint(a ...interface{})
- func EPrintf(format string, a ...interface{})
- func EPrintln(a ...interface{})
- func ERedPrint(a ...interface{})
- func ERedPrintf(format string, a ...interface{})
- func ERedPrintln(a ...interface{})
- func ERedUnderlinePrint(a ...interface{})
- func ERedUnderlinePrintf(format string, a ...interface{})
- func ERedUnderlinePrintln(a ...interface{})
- func EUnderlinePrint(a ...interface{})
- func EUnderlinePrintf(format string, a ...interface{})
- func EUnderlinePrintln(a ...interface{})
- func EYellowPrint(a ...interface{})
- func EYellowPrintf(format string, a ...interface{})
- func EYellowPrintln(a ...interface{})
- func EYellowUnderlinePrint(a ...interface{})
- func EYellowUnderlinePrintf(format string, a ...interface{})
- func EYellowUnderlinePrintln(a ...interface{})
- func GreenPrint(a ...interface{})
- func GreenPrintf(format string, a ...interface{})
- func GreenPrintln(a ...interface{})
- func GreenUnderlinePrint(a ...interface{})
- func GreenUnderlinePrintf(format string, a ...interface{})
- func GreenUnderlinePrintln(a ...interface{})
- func ItalicPrint(a ...interface{})
- func ItalicPrintf(format string, a ...interface{})
- func ItalicPrintln(a ...interface{})
- func Print(a ...interface{})
- func PrintLine(s string)
- func PrintLineIfNotEmpty(s string)
- func Printf(format string, a ...interface{})
- func Println(a ...interface{})
- func RedPrint(a ...interface{})
- func RedPrintf(format string, a ...interface{})
- func RedPrintln(a ...interface{})
- func RedUnderlinePrint(a ...interface{})
- func RedUnderlinePrintf(format string, a ...interface{})
- func RedUnderlinePrintln(a ...interface{})
- func UnderlinePrint(a ...interface{})
- func UnderlinePrintf(format string, a ...interface{})
- func UnderlinePrintln(a ...interface{})
- func YellowPrint(a ...interface{})
- func YellowPrintf(format string, a ...interface{})
- func YellowPrintln(a ...interface{})
- func YellowUnderlinePrint(a ...interface{})
- func YellowUnderlinePrintf(format string, a ...interface{})
- func YellowUnderlinePrintln(a ...interface{})
- type Attribute
- type Color
- type Printer
- func (p *Printer) ChangeWriter(newWriter io.Writer)
- func (p *Printer) CurrentWriter() io.Writer
- func (p *Printer) Print(color *Color, a ...interface{}) error
- func (p *Printer) Printf(color *Color, format string, a ...interface{}) error
- func (p *Printer) Println(color *Color, a ...interface{}) error
- func (p *Printer) Write(b []byte) (n int, err error)
- type String
- func BlueString(format string, a ...interface{}) String
- func BlueUnderlineString(format string, a ...interface{}) String
- func BoldString(format string, a ...interface{}) String
- func BoldUnderlineString(format string, a ...interface{}) String
- func ColorString(color *Color, format string, a ...interface{}) String
- func CyanString(format string, a ...interface{}) String
- func CyanUnderlineString(format string, a ...interface{}) String
- func GreenString(format string, a ...interface{}) String
- func GreenUnderlineString(format string, a ...interface{}) String
- func ItalicString(format string, a ...interface{}) String
- func RedString(format string, a ...interface{}) String
- func RedUnderlineString(format string, a ...interface{}) String
- func UnderlineString(format string, a ...interface{}) String
- func YellowString(format string, a ...interface{}) String
- func YellowUnderlineString(format string, a ...interface{}) String
- func (s *String) ChangeColor(newColor *Color)
- func (s String) Color() *Color
- func (s String) Get(noColor bool) string
- func (s String) GetForStderr() string
- func (s String) GetForStdout() string
- func (s String) Pure() string
- func (s String) WithColor(newColor *Color) String
- func (s String) Wrap() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RED = getColorCached(FgRed) GREEN = getColorCached(FgGreen) BLUE = getColorCached(FgBlue) CYAN = getColorCached(FgCyan) YELLOW = getColorCached(FgYellow) BOLD = getColorCached(Bold) UNDERLINE = getColorCached(Underline) ITALIC = getColorCached(Italic) BOLDUNDERLINE = GetColor(Bold, Underline) REDUNDERLINE = GetColor(FgRed, Underline) GREENUNDERLINE = GetColor(FgGreen, Underline) BLUEUNDERLINE = GetColor(FgBlue, Underline) CYANUNDERLINE = GetColor(FgCyan, Underline) YELLOWUNDERLINE = GetColor(FgYellow, Underline) )
View Source
var Stderr = NewPrinter(os.Stderr, false)
View Source
var Stdout = NewPrinter(os.Stdout, false)
Functions ¶
func BluePrintf ¶
func BluePrintf(format string, a ...interface{})
func BluePrintln ¶
func BluePrintln(a ...interface{})
func BlueUnderlinePrint ¶
func BlueUnderlinePrint(a ...interface{})
func BlueUnderlinePrintf ¶
func BlueUnderlinePrintf(format string, a ...interface{})
func BlueUnderlinePrintln ¶
func BlueUnderlinePrintln(a ...interface{})
func BoldPrintf ¶
func BoldPrintf(format string, a ...interface{})
func BoldPrintln ¶
func BoldPrintln(a ...interface{})
func BoldUnderlinePrint ¶
func BoldUnderlinePrint(a ...interface{})
func BoldUnderlinePrintf ¶
func BoldUnderlinePrintf(format string, a ...interface{})
func BoldUnderlinePrintln ¶
func BoldUnderlinePrintln(a ...interface{})
func CyanPrintf ¶
func CyanPrintf(format string, a ...interface{})
func CyanPrintln ¶
func CyanPrintln(a ...interface{})
func CyanUnderlinePrint ¶
func CyanUnderlinePrint(a ...interface{})
func CyanUnderlinePrintf ¶
func CyanUnderlinePrintf(format string, a ...interface{})
func CyanUnderlinePrintln ¶
func CyanUnderlinePrintln(a ...interface{})
func EBluePrint ¶
func EBluePrint(a ...interface{})
func EBluePrintf ¶
func EBluePrintf(format string, a ...interface{})
func EBluePrintln ¶
func EBluePrintln(a ...interface{})
func EBlueUnderlinePrint ¶
func EBlueUnderlinePrint(a ...interface{})
func EBlueUnderlinePrintf ¶
func EBlueUnderlinePrintf(format string, a ...interface{})
func EBlueUnderlinePrintln ¶
func EBlueUnderlinePrintln(a ...interface{})
func EBoldPrint ¶
func EBoldPrint(a ...interface{})
func EBoldPrintf ¶
func EBoldPrintf(format string, a ...interface{})
func EBoldPrintln ¶
func EBoldPrintln(a ...interface{})
func EBoldUnderlinePrint ¶
func EBoldUnderlinePrint(a ...interface{})
func EBoldUnderlinePrintf ¶
func EBoldUnderlinePrintf(format string, a ...interface{})
func EBoldUnderlinePrintln ¶
func EBoldUnderlinePrintln(a ...interface{})
func ECyanPrint ¶
func ECyanPrint(a ...interface{})
func ECyanPrintf ¶
func ECyanPrintf(format string, a ...interface{})
func ECyanPrintln ¶
func ECyanPrintln(a ...interface{})
func ECyanUnderlinePrint ¶
func ECyanUnderlinePrint(a ...interface{})
func ECyanUnderlinePrintf ¶
func ECyanUnderlinePrintf(format string, a ...interface{})
func ECyanUnderlinePrintln ¶
func ECyanUnderlinePrintln(a ...interface{})
func EGreenPrint ¶
func EGreenPrint(a ...interface{})
func EGreenPrintf ¶
func EGreenPrintf(format string, a ...interface{})
func EGreenPrintln ¶
func EGreenPrintln(a ...interface{})
func EGreenUnderlinePrint ¶
func EGreenUnderlinePrint(a ...interface{})
func EGreenUnderlinePrintf ¶
func EGreenUnderlinePrintf(format string, a ...interface{})
func EGreenUnderlinePrintln ¶
func EGreenUnderlinePrintln(a ...interface{})
func EItalicPrint ¶
func EItalicPrint(a ...interface{})
func EItalicPrintf ¶
func EItalicPrintf(format string, a ...interface{})
func EItalicPrintln ¶
func EItalicPrintln(a ...interface{})
func ERedPrintf ¶
func ERedPrintf(format string, a ...interface{})
func ERedPrintln ¶
func ERedPrintln(a ...interface{})
func ERedUnderlinePrint ¶
func ERedUnderlinePrint(a ...interface{})
func ERedUnderlinePrintf ¶
func ERedUnderlinePrintf(format string, a ...interface{})
func ERedUnderlinePrintln ¶
func ERedUnderlinePrintln(a ...interface{})
func EUnderlinePrint ¶
func EUnderlinePrint(a ...interface{})
func EUnderlinePrintf ¶
func EUnderlinePrintf(format string, a ...interface{})
func EUnderlinePrintln ¶
func EUnderlinePrintln(a ...interface{})
func EYellowPrint ¶
func EYellowPrint(a ...interface{})
func EYellowPrintf ¶
func EYellowPrintf(format string, a ...interface{})
func EYellowPrintln ¶
func EYellowPrintln(a ...interface{})
func EYellowUnderlinePrint ¶
func EYellowUnderlinePrint(a ...interface{})
func EYellowUnderlinePrintf ¶
func EYellowUnderlinePrintf(format string, a ...interface{})
func EYellowUnderlinePrintln ¶
func EYellowUnderlinePrintln(a ...interface{})
func GreenPrint ¶
func GreenPrint(a ...interface{})
func GreenPrintf ¶
func GreenPrintf(format string, a ...interface{})
func GreenPrintln ¶
func GreenPrintln(a ...interface{})
func GreenUnderlinePrint ¶
func GreenUnderlinePrint(a ...interface{})
func GreenUnderlinePrintf ¶
func GreenUnderlinePrintf(format string, a ...interface{})
func GreenUnderlinePrintln ¶
func GreenUnderlinePrintln(a ...interface{})
func ItalicPrint ¶
func ItalicPrint(a ...interface{})
func ItalicPrintf ¶
func ItalicPrintf(format string, a ...interface{})
func ItalicPrintln ¶
func ItalicPrintln(a ...interface{})
func PrintLineIfNotEmpty ¶
func PrintLineIfNotEmpty(s string)
func RedPrintln ¶
func RedPrintln(a ...interface{})
func RedUnderlinePrint ¶
func RedUnderlinePrint(a ...interface{})
func RedUnderlinePrintf ¶
func RedUnderlinePrintf(format string, a ...interface{})
func RedUnderlinePrintln ¶
func RedUnderlinePrintln(a ...interface{})
func UnderlinePrint ¶
func UnderlinePrint(a ...interface{})
func UnderlinePrintf ¶
func UnderlinePrintf(format string, a ...interface{})
func UnderlinePrintln ¶
func UnderlinePrintln(a ...interface{})
func YellowPrint ¶
func YellowPrint(a ...interface{})
func YellowPrintf ¶
func YellowPrintf(format string, a ...interface{})
func YellowPrintln ¶
func YellowPrintln(a ...interface{})
func YellowUnderlinePrint ¶
func YellowUnderlinePrint(a ...interface{})
func YellowUnderlinePrintf ¶
func YellowUnderlinePrintf(format string, a ...interface{})
func YellowUnderlinePrintln ¶
func YellowUnderlinePrintln(a ...interface{})
Types ¶
type Attribute ¶
type Attribute int
Attribute defines a single SGR Code
const ( Reset Attribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut )
Base attributes
Foreground text colors
const ( FgHiBlack Attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite )
Foreground Hi-Intensity text colors
Background text colors
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
Color defines a custom color object which is defined by SGR parameters.
type Printer ¶
type Printer struct { NoColor bool // contains filtered or unexported fields }
func (*Printer) ChangeWriter ¶
func (*Printer) CurrentWriter ¶
type String ¶
type String struct {
// contains filtered or unexported fields
}
func BlueString ¶
func BlueUnderlineString ¶
func BoldString ¶
func BoldUnderlineString ¶
func ColorString ¶ added in v0.4.42
func CyanString ¶
func CyanUnderlineString ¶
func GreenString ¶
func GreenUnderlineString ¶
func ItalicString ¶
func RedUnderlineString ¶
func UnderlineString ¶
func YellowString ¶
func YellowUnderlineString ¶
func (*String) ChangeColor ¶
func (String) GetForStderr ¶
func (String) GetForStdout ¶
Click to show internal directories.
Click to hide internal directories.