Documentation
¶
Overview ¶
Package termwrap is a helper to wrap long longs of text broken up at word boundaries based on the size of the parent terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TermWrap ¶
type TermWrap struct {
// contains filtered or unexported fields
}
TermWrap manages the current size of the parent terminal.
func NewTermWrap ¶
NewTermWrap creates a new TermWrap with the size of the parent terminal or default values if the size is unknown.
func (*TermWrap) IndentedParagraph ¶
IndentedParagraph wraps the content at word boundaries indent by the prefix if-and-only-if the current terminal width is at _least_ of a minimumWidth. If it is not, then it does not indent the content and makes full use of the width.
Click to show internal directories.
Click to hide internal directories.