TerminalWidth returns the width of the terminal that controls the process
()
| 424 | |
| 425 | // TerminalWidth returns the width of the terminal that controls the process |
| 426 | func (s *IOStreams) TerminalWidth() int { |
| 427 | w, _, err := s.term.Size() |
| 428 | if err == nil && w > 0 { |
| 429 | return w |
| 430 | } |
| 431 | return DefaultWidth |
| 432 | } |
| 433 | |
| 434 | func (s *IOStreams) ColorScheme() *ColorScheme { |
| 435 | return &ColorScheme{ |