Documentation ¶
Overview ¶
Package color enable color output for terminal use ansi escape code
Index ¶
- Constants
- Variables
- func Has(c string) bool
- type Renderer
- func (r *Renderer) Begin(w io.Writer) error
- func (r *Renderer) Disable()
- func (r *Renderer) End(w io.Writer) error
- func (r *Renderer) Error(args ...interface{}) (int, error)
- func (r *Renderer) Errorf(format string, args ...interface{}) (int, error)
- func (r *Renderer) Errorln(args ...interface{}) (int, error)
- func (r *Renderer) Fprint(w io.Writer, args ...interface{}) (int, error)
- func (r *Renderer) Fprintf(w io.Writer, format string, args ...interface{}) (int, error)
- func (r *Renderer) Fprintln(w io.Writer, args ...interface{}) (int, error)
- func (r *Renderer) Print(args ...interface{}) (int, error)
- func (r *Renderer) Printf(format string, args ...interface{}) (int, error)
- func (r *Renderer) Println(args ...interface{}) (int, error)
- func (r *Renderer) Render(str string) string
- func (r *Renderer) RenderTo(w io.Writer, str string) (int, error)
- func (r *Renderer) Sprint(args ...interface{}) string
- func (r *Renderer) Sprintf(format string, args ...interface{}) string
- func (r *Renderer) Sprintln(args ...interface{}) string
- func (r *Renderer) Writer(prefix string, w io.Writer) io.Writer
- type Writer
Constants ¶
View Source
const ( BLACK = "black" RED = "red" GREEN = "green" YELLOW = "yellow" BLUE = "blue" MAGENTA = "magenta" CYAN = "cyan" WHITE = "white" )
Variables ¶
View Source
var ( LightBlack = FgHl(BLACK) LightRed = FgHl(RED) LightGreen = FgHl(GREEN) LightYellow = FgHl(YELLOW) LightBlue = FgHl((BLUE)) LightMagenta = FgHl(MAGENTA) LightCyan = FgHl(CYAN) LightWhite = FgHl(WHITE) Black = Fg(BLACK) Red = Fg(RED) Green = Fg(GREEN) Yellow = Fg(YELLOW) Blue = Fg((BLUE)) Magenta = Fg(MAGENTA) Cyan = Fg(CYAN) White = Fg(WHITE) )
Functions ¶
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a render for terminal string
Click to show internal directories.
Click to hide internal directories.