Documentation ¶
Index ¶
- type Color
- type Printer
- func (p *Printer) Err(s string)
- func (p *Printer) Errf(format string, args ...interface{})
- func (p *Printer) Errln(s string)
- func (p *Printer) Error(s string, c Color)
- func (p *Printer) Errorf(format string, c Color, args ...interface{})
- func (p *Printer) Errorln(s string, c Color)
- func (p *Printer) Print(s string, c Color)
- func (p *Printer) Printf(format string, c Color, args ...interface{})
- func (p *Printer) Println(s string, c Color)
- func (p *Printer) Promt(s string, c Color) string
- func (p *Printer) Promtf(s string, c Color, args ...interface{}) string
- func (p *Printer) Promtln(s string, c Color) string
- func (p *Printer) Read() string
- func (p *Printer) Write(s string)
- func (p *Printer) Writef(format string, args ...interface{})
- func (p *Printer) Writeln(s string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color string
Font Colors
const ( BlackBright Color = "\u001b[30;1m" RedBright Color = "\u001b[31;1m" GreenBright Color = "\u001b[32;1m" YellowBright Color = "\u001b[33;1m" BlueBright Color = "\u001b[34;1m" MagentaBright Color = "\u001b[35;1m" CyanBright Color = "\u001b[36;1m" WhiteBright Color = "\u001b[37;1m" )
Font Colors Bright
const ( BackgroundBlack Color = "\u001b[40m" BackgroundRed Color = "\u001b[41m" BackgroundGreen Color = "\u001b[42m" BackgroundYellow Color = "\u001b[43m" BackgroundBlue Color = "\u001b[44m" BackgroundMagenta Color = "\u001b[45m" BackgroundCyan Color = "\u001b[46m" BackgroundWhite Color = "\u001b[47m" )
Background Colors
const ( BackgroundBlackBright Color = "\u001b[40;1m" BackgroundRedBright Color = "\u001b[41;1m" BackgroundGreenBright Color = "\u001b[42;1m" BackgroundYellowBright Color = "\u001b[43;1m" BackgroundBlueBright Color = "\u001b[44;1m" BackgroundMagentaBright Color = "\u001b[45;1m" BackgroundCyanBright Color = "\u001b[46;1m" BackgroundWhiteBright Color = "\u001b[47;1m" )
Background Colors Bright
type Printer ¶
type Printer struct { Stdin *os.File Stdout *os.File Stderr *os.File // contains filtered or unexported fields }
func NewDefault ¶
func NewDefault() *Printer
The same as New() but with os.Stdout, os.Stderr and os.Stdin as default.
Click to show internal directories.
Click to hide internal directories.