TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal.
()
| 142 | |
| 143 | // TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal. |
| 144 | func (s *IOStreams) TerminalTheme() string { |
| 145 | if s.terminalTheme == "" { |
| 146 | s.DetectTerminalTheme() |
| 147 | } |
| 148 | |
| 149 | return s.terminalTheme |
| 150 | } |
| 151 | |
| 152 | func (s *IOStreams) SetColorEnabled(colorEnabled bool) { |
| 153 | s.colorOverride = true |
no test coverage detected