ParagraphPrinter can print paragraphs to a fixed line width. The text will split between words, so that words will stick together. It's like in a book.
| 15 | // The text will split between words, so that words will stick together. |
| 16 | // It's like in a book. |
| 17 | type ParagraphPrinter struct { |
| 18 | MaxWidth int |
| 19 | Writer io.Writer |
| 20 | } |
| 21 | |
| 22 | // WithMaxWidth returns a new ParagraphPrinter with a specific MaxWidth |
| 23 | func (p ParagraphPrinter) WithMaxWidth(width int) *ParagraphPrinter { |
nothing calls this directly
no outgoing calls
no test coverage detected