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