color

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlueCode = "\033[34m"
View Source
var CyanCode = "\033[36m"
View Source
var GrayCode = "\033[37m"
View Source
var GreenCode = "\033[32m"
View Source
var PurpleCode = "\033[35m"
View Source
var RedCode = "\033[31m"
View Source
var ResetCode = "\033[0m"
View Source
var WhiteCode = "\033[97m"
View Source
var YellowCode = "\033[33m"

Functions

This section is empty.

Types

type ColorString

type ColorString struct {
	// contains filtered or unexported fields
}

func (*ColorString) Blue

func (cs *ColorString) Blue(msg string) *ColorString

Wrap the input msg into the ANSI blue

func (*ColorString) Cyan

func (cs *ColorString) Cyan(msg string) *ColorString

Wrap the input msg into the ANSI cyan

func (*ColorString) Gray

func (cs *ColorString) Gray(msg string) *ColorString

Wrap the input msg into the ANSI gray

func (*ColorString) Green

func (cs *ColorString) Green(msg string) *ColorString

Wrap the input msg into the ANSI green

func (*ColorString) Purple

func (cs *ColorString) Purple(msg string) *ColorString

Wrap the input msg into the ANSI purple

func (*ColorString) Red

func (cs *ColorString) Red(msg string) *ColorString

Wrap the input msg into the ANSI red

func (*ColorString) Reset

func (cs *ColorString) Reset(msg string) *ColorString

Reset the ansi color of the given message

func (*ColorString) String

func (cs *ColorString) String() string

Returns the completed string from a color string instance

func (*ColorString) White

func (cs *ColorString) White(msg string) *ColorString

Wrap the input msg into the ANSI white

func (*ColorString) Write

func (cs *ColorString) Write(msg string) *ColorString

Write a string to the ColorString instance. This is to add in normal or cloning existing ColorString instances

func (*ColorString) Yellow

func (cs *ColorString) Yellow(msg string) *ColorString

Wrap the input msg into the ANSI yellow

Jump to

Keyboard shortcuts

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