| 49 | } |
| 50 | |
| 51 | type IOStreams struct { |
| 52 | term term |
| 53 | |
| 54 | In fileReader |
| 55 | Out fileWriter |
| 56 | ErrOut fileWriter |
| 57 | |
| 58 | // ContentOut is the writer for external content (HTTP response bodies, |
| 59 | // gist files, etc.) where the application is not the author of the bytes. |
| 60 | // By default it sanitizes ANSI escape sequences before they reach the |
| 61 | // underlying stdout. SetContentSanitization toggles the sanitization at |
| 62 | // the command layer (e.g. via an --allow-escape-sequences flag). |
| 63 | ContentOut io.Writer |
| 64 | |
| 65 | sanitizeContent bool |
| 66 | |
| 67 | terminalTheme string |
| 68 | |
| 69 | progressIndicatorEnabled bool |
| 70 | progressIndicator *spinner.Spinner |
| 71 | progressIndicatorMu sync.Mutex |
| 72 | spinnerDisabled bool |
| 73 | |
| 74 | alternateScreenBufferEnabled bool |
| 75 | alternateScreenBufferActive bool |
| 76 | alternateScreenBufferMu sync.Mutex |
| 77 | |
| 78 | stdinTTYOverride bool |
| 79 | stdinIsTTY bool |
| 80 | stdoutTTYOverride bool |
| 81 | stdoutIsTTY bool |
| 82 | stderrTTYOverride bool |
| 83 | stderrIsTTY bool |
| 84 | |
| 85 | colorOverride bool |
| 86 | colorEnabled bool |
| 87 | colorLabels bool |
| 88 | accessibleColorsEnabled bool |
| 89 | |
| 90 | pagerCommand string |
| 91 | pagerProcess *os.Process |
| 92 | |
| 93 | neverPrompt bool |
| 94 | accessiblePrompterEnabled bool |
| 95 | experimentalPrompterEnabled bool |
| 96 | |
| 97 | TempFileOverride *os.File |
| 98 | } |
| 99 | |
| 100 | func (s *IOStreams) ColorEnabled() bool { |
| 101 | if s.colorOverride { |
nothing calls this directly
no outgoing calls
no test coverage detected