@@ -7,7 +7,6 @@ suits you.
77
88![ Color] ( https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg )
99
10-
1110## Install
1211
1312``` bash
@@ -124,17 +123,17 @@ fmt.Println("All text will now be bold magenta.")
124123```
125124
126125### Disable/Enable color
127-
126+
128127There might be a case where you want to explicitly disable/enable color output. the
129128` go-isatty ` package will automatically disable color output for non-tty output streams
130129(for example if the output were piped directly to ` less ` ).
131130
132131The ` color ` package also disables color output if the [ ` NO_COLOR ` ] ( https://no-color.org ) environment
133- variable is set (regardless of its value) .
132+ variable is set to a non-empty string .
134133
135134` Color ` has support to disable/enable colors programmatically both globally and
136135for single color definitions. For example suppose you have a CLI app and a
137- ` -- no-color ` bool flag. You can easily disable the color output with:
136+ ` -no-color ` bool flag. You can easily disable the color output with:
138137
139138``` go
140139var flagNoColor = flag.Bool (" no-color" , false , " Disable color output" )
@@ -167,11 +166,10 @@ To output color in GitHub Actions (or other CI systems that support ANSI colors)
167166* Save/Return previous values
168167* Evaluate fmt.Formatter interface
169168
170-
171169## Credits
172170
173- * [ Fatih Arslan] ( https://github.com/fatih )
174- * Windows support via @mattn : [ colorable] ( https://github.com/mattn/go-colorable )
171+ * [ Fatih Arslan] ( https://github.com/fatih )
172+ * Windows support via @mattn : [ colorable] ( https://github.com/mattn/go-colorable )
175173
176174## License
177175
0 commit comments