MCPcopy Create free account

hub / github.com/fatih/color / functions

Functions81 in github.com/fatih/color

↓ 16 callersFunctioncolorPrint
(format string, p Attribute, a ...interface{})
color.go:454
↓ 16 callersFunctioncolorString
(format string, p Attribute, a ...interface{})
color.go:468
↓ 7 callersFunctionNew
New returns a newly created color object.
color.go:117
↓ 6 callersMethodPrint
Print formats using the default formats for its operands and writes to standard output. Spaces are added between operands when neither is a string. It
color.go:216
↓ 6 callersMethodwrap
wrap wraps the s string with the colors attributes. The string is ready to be printed.
color.go:373
↓ 5 callersMethodFprintf
Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered. On Windows, u
color.go:227
↓ 5 callersMethodPrintf
Printf formats according to a format specifier and writes to standard output. It returns the number of bytes written and any write error encountered.
color.go:237
↓ 5 callersMethodisNoColorSet
()
color.go:402
↓ 4 callersMethodFprint
Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the
color.go:204
↓ 4 callersMethodSet
Set sets the SGR sequence.
color.go:149
↓ 4 callersMethodSprintf
Sprintf is just like Printf, but returns a string instead of printing it.
color.go:278
↓ 3 callersMethodFprintln
Fprintln formats using the default formats for its operands and writes to w. Spaces are always added between operands and a newline is appended. On Wi
color.go:248
↓ 3 callersMethodSetWriter
SetWriter is used to set the SGR sequence with the given io.Writer. This is a low-level function, and users should use the higher-level functions, suc
color.go:169
↓ 3 callersMethodUnsetWriter
UnsetWriter resets all escape attributes and clears the output with the give io.Writer. Usually should be called after SetWriter().
color.go:180
↓ 3 callersFunctionboolPtr
(v bool)
color.go:437
↓ 3 callersMethodformat
()
color.go:381
↓ 3 callersFunctionnoColorIsSet
noColorIsSet returns true if the environment variable NO_COLOR is set to a non-empty string.
color.go:39
↓ 3 callersMethodunset
()
color.go:158
↓ 2 callersFunctionBlack
Black is a convenient helper function to print with black foreground. A newline is appended to format by default.
color.go:480
↓ 2 callersFunctionBlackString
BlackString is a convenient helper function to return a string with black foreground.
color.go:512
↓ 2 callersFunctionBlue
Blue is a convenient helper function to print with blue foreground. A newline is appended to format by default.
color.go:496
↓ 2 callersFunctionBlueString
BlueString is a convenient helper function to return a string with blue foreground.
color.go:528
↓ 2 callersFunctionCyan
Cyan is a convenient helper function to print with cyan foreground. A newline is appended to format by default.
color.go:504
↓ 2 callersFunctionCyanString
CyanString is a convenient helper function to return a string with cyan foreground.
color.go:538
↓ 2 callersFunctionGreen
Green is a convenient helper function to print with green foreground. A newline is appended to format by default.
color.go:488
↓ 2 callersFunctionGreenString
GreenString is a convenient helper function to return a string with green foreground.
color.go:520
↓ 2 callersFunctionHiBlack
HiBlack is a convenient helper function to print with hi-intensity black foreground. A newline is appended to format by default.
color.go:546
↓ 2 callersFunctionHiBlackString
HiBlackString is a convenient helper function to return a string with hi-intensity black foreground.
color.go:578
↓ 2 callersFunctionHiBlue
HiBlue is a convenient helper function to print with hi-intensity blue foreground. A newline is appended to format by default.
color.go:562
↓ 2 callersFunctionHiBlueString
HiBlueString is a convenient helper function to return a string with hi-intensity blue foreground.
color.go:600
↓ 2 callersFunctionHiCyan
HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A newline is appended to format by default.
color.go:570
↓ 2 callersFunctionHiCyanString
HiCyanString is a convenient helper function to return a string with hi-intensity cyan foreground.
color.go:610
↓ 2 callersFunctionHiGreen
HiGreen is a convenient helper function to print with hi-intensity green foreground. A newline is appended to format by default.
color.go:554
↓ 2 callersFunctionHiGreenString
HiGreenString is a convenient helper function to return a string with hi-intensity green foreground.
color.go:588
↓ 2 callersFunctionHiMagenta
HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. A newline is appended to format by default.
color.go:566
↓ 2 callersFunctionHiMagentaString
HiMagentaString is a convenient helper function to return a string with hi-intensity magenta foreground.
color.go:604
↓ 2 callersFunctionHiRed
HiRed is a convenient helper function to print with hi-intensity red foreground. A newline is appended to format by default.
color.go:550
↓ 2 callersFunctionHiRedString
HiRedString is a convenient helper function to return a string with hi-intensity red foreground.
color.go:584
↓ 2 callersFunctionHiWhite
HiWhite is a convenient helper function to print with hi-intensity white foreground. A newline is appended to format by default.
color.go:574
↓ 2 callersFunctionHiWhiteString
HiWhiteString is a convenient helper function to return a string with hi-intensity white foreground.
color.go:614
↓ 2 callersFunctionHiYellow
HiYellow is a convenient helper function to print with hi-intensity yellow foreground. A newline is appended to format by default.
color.go:558
↓ 2 callersFunctionHiYellowString
HiYellowString is a convenient helper function to return a string with hi-intensity yellow foreground.
color.go:594
↓ 2 callersFunctionMagenta
Magenta is a convenient helper function to print with magenta foreground. A newline is appended to format by default.
color.go:500
↓ 2 callersFunctionMagentaString
MagentaString is a convenient helper function to return a string with magenta foreground.
color.go:532
↓ 2 callersMethodPrintln
Println formats using the default formats for its operands and writes to standard output. Spaces are always added between operands and a newline is ap
color.go:260
↓ 2 callersFunctionRed
Red is a convenient helper function to print with red foreground. A newline is appended to format by default.
color.go:484
↓ 2 callersFunctionRedString
RedString is a convenient helper function to return a string with red foreground.
color.go:516
↓ 2 callersMethodSprintFunc
SprintFunc returns a new function that returns colorized strings for the given arguments with fmt.Sprint(). Useful to put into or mix into other strin
color.go:336
↓ 2 callersFunctionUnset
Unset resets all escape attributes and clears the output. Usually should be called after Set().
color.go:140
↓ 2 callersFunctionWhite
White is a convenient helper function to print with white foreground. A newline is appended to format by default.
color.go:508
↓ 2 callersFunctionWhiteString
WhiteString is a convenient helper function to return a string with white foreground.
color.go:542
↓ 2 callersFunctionYellow
Yellow is a convenient helper function to print with yellow foreground. A newline is appended to format by default.
color.go:492
↓ 2 callersFunctionYellowString
YellowString is a convenient helper function to return a string with yellow foreground.
color.go:524
↓ 2 callersFunctiongetCachedColor
(p Attribute)
color.go:441
↓ 1 callersMethodAdd
Add is used to chain SGR parameters. Use as many as parameters to combine and create custom color objects. Example: Add(color.FgRed, color.Underline).
color.go:194
↓ 1 callersMethodDisableColor
DisableColor disables the color output. Useful to not change any existing code and still being able to output. Can be used for flags like "--no-color"
color.go:392
↓ 1 callersMethodEquals
Equals returns a boolean value indicating whether two colors are equal.
color.go:413
↓ 1 callersMethodFprintFunc
FprintFunc returns a new function that prints the passed arguments as colorized with color.Fprint().
color.go:284
↓ 1 callersMethodPrintfFunc
PrintfFunc returns a new function that prints the passed arguments as colorized with color.Printf().
color.go:308
↓ 1 callersMethodPrintlnFunc
PrintlnFunc returns a new function that prints the passed arguments as colorized with color.Println().
color.go:324
↓ 1 callersFunctionSet
Set sets the given parameters immediately. It will change the color of output with the given SGR parameters until color.Unset() is called.
color.go:132
↓ 1 callersMethodSprint
Sprint is just like Print, but returns a string instead of printing it.
color.go:268
↓ 1 callersMethodSprintfFunc
SprintfFunc returns a new function that returns colorized strings for the given arguments with fmt.Sprintf(). Useful to put into or mix into other str
color.go:345
↓ 1 callersMethodSprintln
Sprintln is just like Println, but returns a string instead of printing it.
color.go:273
↓ 1 callersMethodattrExists
(a Attribute)
color.go:427
↓ 1 callersMethodsequence
sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" an example output might be: "1;36" -> bold cyan
color.go:362
↓ 1 callersMethodunformat
()
color.go:385
MethodEnableColor
EnableColor enables the color output. Use it in conjunction with DisableColor(). Otherwise, this method has no side effects.
color.go:398
MethodFprintfFunc
FprintfFunc returns a new function that prints the passed arguments as colorized with color.Fprintf().
color.go:300
MethodFprintlnFunc
FprintlnFunc returns a new function that prints the passed arguments as colorized with color.Fprintln().
color.go:316
MethodPrintFunc
PrintFunc returns a new function that prints the passed arguments as colorized with color.Print().
color.go:292
MethodSprintlnFunc
SprintlnFunc returns a new function that returns colorized strings for the given arguments with fmt.Sprintln(). Useful to put into or mix into other s
color.go:354
FunctionTestColor
Testing colors is kinda different. First we test for given colors and their escaped formatted results. Next we create some visual tests to be tested.
color_test.go:15
FunctionTestColorEquals
(t *testing.T)
color_test.go:72
FunctionTestColorVisual
(t *testing.T)
color_test.go:237
FunctionTestNoColor
(t *testing.T)
color_test.go:106
FunctionTestNoColor_Env
(t *testing.T)
color_test.go:160
FunctionTestNoFormat
(t *testing.T)
color_test.go:338
FunctionTestNoFormatString
(t *testing.T)
color_test.go:388
FunctionTest_noColorIsSet
(t *testing.T)
color_test.go:202
Functioninit
()
color_windows.go:9