Documentation
¶
Index ¶
Constants ¶
View Source
const ( NewLine = "\n" // Newline DbColor = "\033[1;31m" // ANSI dbecho code ResetColor = "\033[0m" // ANSI reset code )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NormalPrinter ¶
type Printer ¶
type Printer interface { NormalPrinter Fprinter Sprinter DbPrinter SetWriter(w io.Writer) SetDbWriter(w io.Writer) SetPrefix(prefix []byte) SetSuffix(suffix []byte) }
Printer implements common printer functionality. It provides Print, Println, and Printf to os.Stdout as well as the more general FPrint, etc methods for writing to a specified io.Writer. In addition, the standard Sprint methods are available.
For convenience, a DbPrinter is provided through the methods DbPrint, DbPrintln, and DbPrintf. These 'debug' printer functions print to os.Stderr by default and wrap the output in given ANSI codes.
func NewPrinter ¶
func NewPrinter() Printer
Click to show internal directories.
Click to hide internal directories.