Colorize

package
v0.0.0-...-4ea56bf Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultColors map[string]string
)

Functions

func Color

func Color(v string) string

func ColorPrefix

func ColorPrefix(v string) string

func Fprint

func Fprint(w io.Writer, a string) (n int, err error)

func Fprintf

func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)

func Fprintln

func Fprintln(w io.Writer, a string) (n int, err error)

func Print

func Print(a string) (n int, err error)

func Printf

func Printf(format string, a ...interface{}) (n int, err error)

func Println

func Println(a string) (n int, err error)

Types

type Colorize

type Colorize struct {
	Colors  map[string]string
	Disable bool
	Reset   bool
}

func (*Colorize) Color

func (c *Colorize) Color(v string) string

func (*Colorize) ColorPrefix

func (c *Colorize) ColorPrefix(v string) string

Jump to

Keyboard shortcuts

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