Documentation ¶
Overview ¶
Package ansi supports ANSI color decorated functions for fmt package You can decorate output text with colors by replacing fmt.Print function with ansi.{ColorName}.Print
Index ¶
- type Code
- func (i Code) FPrint(w io.Writer, a ...interface{})
- func (i Code) FPrintf(w io.Writer, s string, a ...interface{})
- func (i Code) FPrintln(w io.Writer, a ...interface{})
- func (i Code) Print(a ...interface{})
- func (i Code) Printf(s string, a ...interface{})
- func (i Code) Println(a ...interface{})
- func (i Code) Sprint(a ...interface{}) string
- func (i Code) Sprintf(s string, a ...interface{}) string
- func (i Code) Sprintln(s string, a ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code int
Code implements ANSI code support for fmt.Print, fmt.FPrint, and fmt.Sprint functions.
const ( Reset Code = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut )
Available ANSI decorators
Available ANSI Background Color
func (Code) FPrint ¶
FPrint outputs the decorated string with `fmt.FPrint(io.Writer, ...interface{})`
func (Code) FPrintf ¶
FPrintf outputs the decorated string with `fmt.Printf(string, ...interface{})`
func (Code) Print ¶
func (i Code) Print(a ...interface{})
Print outputs the decorated string with `fmt.Print(...interface{})`
func (Code) Println ¶
func (i Code) Println(a ...interface{})
Println outputs the decorated string with `fmt.Println(...interface{})`
Click to show internal directories.
Click to hide internal directories.