color
color copied to clipboard
Redefine .noColor field of Color, NO_COLOR won't affect at runtime
Redefine the ".noColor *bool" field to ".isNoColor bool" of type "Color", this removed the pointless pointer and reduced the complexity.
Which also removed the boolPtr() method(?)
The test "TestNoColor_Env" now removed, because the NO_COLOR env should not affect at runtime.
In my software, I want to force output through HTTP with color(client is curl), but each time New() will always use NO_COLOR env without any judgment, #71 can't work.
In the previous code, New() even will ignore the global NoColor status. This is confusion caused by the function's naming.