Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResponsiveWriter ¶
NewResponsiveWriter creates a terminal-aware writer that automatically wraps text based on the terminal width. If the provided writer is not a terminal or if width detection fails, it will return the original writer unchanged.
Types ¶
type TerminalWriter ¶
type TerminalWriter struct {
// contains filtered or unexported fields
}
TerminalWriter wraps an io.Writer and provides automatic line wrapping based on terminal width It ensures that output text is formatted to fit within the terminal's dimensions.
func (*TerminalWriter) GetWidth ¶
func (w *TerminalWriter) GetWidth() uint
Click to show internal directories.
Click to hide internal directories.