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