We never ask for more than 2. newlines guarantees there are n newlines at the end of the buffer.
(n int)
| 168 | |
| 169 | // newlines guarantees there are n newlines at the end of the buffer. |
| 170 | func (pkg *Package) newlines(n int) { |
| 171 | for !bytes.HasSuffix(pkg.buf.Bytes(), newlineBytes[:n]) { |
| 172 | pkg.buf.WriteRune('\n') |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | // packageDoc prints the docs for the package as Markdown. |
| 177 | func (pkg *Package) packageDoc() { |