diff options
| author | Jeff Willette <jrwillette88@gmail.com> | 2017-09-26 10:58:05 +0000 |
|---|---|---|
| committer | Jeff Willette <jrwillette88@gmail.com> | 2017-09-26 10:58:05 +0000 |
| commit | 7a9c8b7eb6261a08fe511affce373b0f65b798ef (patch) | |
| tree | 06636213b5e0ad293905a0801fd037660037b2a2 | |
| parent | 1535ebc2637cc042c938f07fa26c6356ab8f8504 (diff) | |
| download | colour-7a9c8b7eb6261a08fe511affce373b0f65b798ef.tar.gz colour-7a9c8b7eb6261a08fe511affce373b0f65b798ef.tar.bz2 | |
Changed README Disable section to Disable/Enable
| -rw-r--r-- | README.md | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -129,13 +129,15 @@ defer color.Unset() // Use it in your function fmt.Println("All text will now be bold magenta.") ``` -### Disable color - -There might be a case where you want to disable color output (for example to -pipe the standard output of your app to somewhere else). `Color` has support to -disable colors both globally and for single color definition. For example -suppose you have a CLI app and a `--no-color` bool flag. You can easily disable -the color output with: +### Disable/Enable color + +There might be a case where you want to explicitly disable/enable color output. the +`go-isatty` package will automatically disable color output for non-tty output streams +(for example if the output were piped directly to `less`) + +`Color` has support to disable/enable colors both globally and for single color +definitions. For example suppose you have a CLI app and a `--no-color` bool flag. You +can easily disable the color output with: ```go |
