Skip to content

Commit a045895

Browse files
committed
Add docs to color funcs
1 parent e636e3e commit a045895

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

utils/color.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,26 @@ func makeColorFunc(color string) func(string) string {
3636
}
3737
}
3838

39+
// Magenta outputs ANSI color if stdout is a tty
3940
var Magenta = makeColorFunc("magenta")
41+
42+
// Cyan outputs ANSI color if stdout is a tty
4043
var Cyan = makeColorFunc("cyan")
44+
45+
// Red outputs ANSI color if stdout is a tty
4146
var Red = makeColorFunc("red")
47+
48+
// Yellow outputs ANSI color if stdout is a tty
4249
var Yellow = makeColorFunc("yellow")
50+
51+
// Blue outputs ANSI color if stdout is a tty
4352
var Blue = makeColorFunc("blue")
53+
54+
// Green outputs ANSI color if stdout is a tty
4455
var Green = makeColorFunc("green")
56+
57+
// Gray outputs ANSI color if stdout is a tty
4558
var Gray = makeColorFunc("black+h")
59+
60+
// Bold outputs ANSI color if stdout is a tty
4661
var Bold = makeColorFunc("default+b")

0 commit comments

Comments
 (0)