MCPcopy
hub / github.com/tailscale/tailscale / newlines

Method newlines

tempfork/pkgdoc/pkgdoc.go:170–174  ·  view source on GitHub ↗

We never ask for more than 2. newlines guarantees there are n newlines at the end of the buffer.

(n int)

Source from the content-addressed store, hash-verified

168
169// newlines guarantees there are n newlines at the end of the buffer.
170func (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.
177func (pkg *Package) packageDoc() {

Callers 1

packageDocMethod · 0.95

Calls 1

BytesMethod · 0.80

Tested by

no test coverage detected