MCPcopy Create free account
hub / github.com/tailscale/tailscale / ToText

Method ToText

tempfork/pkgdoc/pkgdoc.go:42–48  ·  view source on GitHub ↗
(w io.Writer, text, prefix, codePrefix string)

Source from the content-addressed store, hash-verified

40}
41
42func (pkg *Package) ToText(w io.Writer, text, prefix, codePrefix string) {
43 d := pkg.doc.Parser().Parse(text)
44 pr := pkg.doc.Printer()
45 pr.TextPrefix = prefix
46 pr.TextCodePrefix = codePrefix
47 w.Write(pr.Text(d))
48}
49
50// ToMarkdown parses the godoc comment text and writes a Markdown rendering to w
51// suitable for a repository README.md: top-level sections become ## headings

Callers

nothing calls this directly

Calls 3

TextMethod · 0.80
WriteMethod · 0.65
ParseMethod · 0.45

Tested by

no test coverage detected