(comment string, indent int)
| 85 | } |
| 86 | |
| 87 | func (w *specWriter) writeComment(comment string, indent int) { |
| 88 | if comment == "" { |
| 89 | return |
| 90 | } |
| 91 | |
| 92 | wrapped := strings.TrimSpace(wordwrap.WrapString(comment, uint(maxLineWidth-indent-2))) |
| 93 | lines := strings.SplitSeq(wrapped, "\n") |
| 94 | |
| 95 | for line := range lines { |
| 96 | w.out.WriteString(pad(indent) + "# " + line + "\n") |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | func (w *specWriter) string() string { |
| 101 | return strings.TrimSpace(w.out.String()) |
no test coverage detected