Documentation ¶
Index ¶
- func Errorf(format string, a ...interface{}) (n int, err error)
- func Errorln(format string, a ...interface{}) (n int, err error)
- func Infof(format string, a ...interface{}) (n int, err error)
- func Infoln(a ...interface{}) (n int, err error)
- func Warnf(format string, a ...interface{}) (n int, err error)
- func Warnln(format string, a ...interface{}) (n int, err error)
- type Config
- type Printer
- func (p *Printer) Close()
- func (p *Printer) Errorf(format string, a ...interface{}) (n int, err error)
- func (p *Printer) Errorln(a ...interface{}) (n int, err error)
- func (p *Printer) Infof(format string, a ...interface{}) (n int, err error)
- func (p *Printer) Infoln(a ...interface{}) (n int, err error)
- func (p *Printer) Warnf(format string, a ...interface{}) (n int, err error)
- func (p *Printer) Warnln(a ...interface{}) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
Errorf formats according to a format specifier and writes to standard output using the provided info color.
func Errorln ¶
Errorln formats using the default formats for its operands and writes to standard output using the provided info color.
func Infof ¶
Infof formats according to a format specifier and writes to standard output using the provided info color.
func Infoln ¶
Infoln formats using the default formats for its operands and writes to standard output using the provided info color.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer struct
func New ¶
New returns a configured printer and a close function. The close function deallocates an inner os.DevNull io.Writer.
Usage:
print, close := printer.New(false, printer.InfoColor(color.New(color.FgWhite, color.Bold)))
defer close()
func (*Printer) Errorf ¶
Errorf formats according to a format specifier and writes to standard output using the provided info color.
func (*Printer) Errorln ¶
Errorln formats using the default formats for its operands and writes to standard output using the provided info color.
func (*Printer) Infof ¶
Infof formats according to a format specifier and writes to standard output using the provided info color.
func (*Printer) Infoln ¶
Infoln formats using the default formats for its operands and writes to standard output using the provided info color.