xcolor

package
v1.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 4 Imported by: 4

README

xcolor

References
  • None
Functions
  • InitTerminal(out io.Writer)
  • InitOsStd()
  • ForceColor()
  • type Color uint8
  • const Black Color
  • const Red Color
  • const Green Color
  • const Yellow Color
  • const Blue Color
  • const Magenta Color
  • const Cyan Color
  • const White Color
  • const Default Color
  • (c Color) Code() string
  • (c Color) String() string
  • DisableColor()
  • EnableColor()
  • (c Color) Print(a ...interface{})
  • (c Color) Printf(format string, a ...interface{})
  • (c Color) Println(a ...interface{})
  • (c Color) Sprint(a ...interface{}) string
  • (c Color) Sprintf(format string, a ...interface{}) string
  • (c Color) Sprintln(a ...interface{}) string

Documentation

Index

Constants

View Source
const (
	FullColorTpl = "\x1b[%dm%s\x1b[0m"
)

Variables

This section is empty.

Functions

func DisableColor

func DisableColor()

func EnableColor

func EnableColor()

func ForceColor

func ForceColor()

func InitOsStd

func InitOsStd()

func InitTerminal

func InitTerminal(out io.Writer)

Types

type Color

type Color uint8
const (
	Black Color = iota + 30
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
	Default Color = 39
)

func (Color) Code

func (c Color) Code() string

func (Color) Print

func (c Color) Print(a ...interface{})

func (Color) Printf

func (c Color) Printf(format string, a ...interface{})

func (Color) Println

func (c Color) Println(a ...interface{})

func (Color) Sprint

func (c Color) Sprint(a ...interface{}) string

func (Color) Sprintf

func (c Color) Sprintf(format string, a ...interface{}) string

func (Color) Sprintln

func (c Color) Sprintln(a ...interface{}) string

func (Color) String

func (c Color) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL