fatih / color

Color package for Go (golang)
https://pkg.go.dev/github.com/fatih/color
MIT License
7.24k stars 615 forks source link

magent / hmagent #126

Closed bl-ue closed 3 years ago

bl-ue commented 3 years ago

In color_test.go, lines 30 and 38, the colors are listed as magent and hmagent, instead of magents and hmagenta. https://github.com/fatih/color/blob/4cad7da0669c843889134a00f32b3e038ea79ac9/color_test.go#L30 https://github.com/fatih/color/blob/4cad7da0669c843889134a00f32b3e038ea79ac9/color_test.go#L38

Is this a mistake, or is it intentional?

When running the tests, I see that the extract character in hmagent pushes the colon way out—is this why?

$ go test
black   : black
red : red
green   : green
yellow  : yellow
blue    : blue
magenta : magenta
cyan    : cyan
white   : white
hblack  : hblack
hred    : hred
hgreen  : hgreen
hyellow : hyellow
hblue   : hblue
hmagenta    : hmagenta
hcyan   : hcyan
hwhite  : hwhite
black   : black
red : red
green   : green
yellow  : yellow
blue    : blue
magenta : magenta
cyan    : cyan
white   : white
hblack  : hblack
hred    : hred
hgreen  : hgreen
hyellow : hyellow
hblue   : hblue
hmagenta    : hmagenta
hcyan   : hcyan
hwhite  : hwhite
...

And I assume magent is truncated to match hmagenta.

bl-ue commented 3 years ago

My conclusion is obviously correct—I'll close this issue now.