gotools/godoc/linkify.go

// LinkifyText HTML-escapes source text and writes it to w.
// Identifiers that are in a "use" position (i.e., that are
// not being declared), are wrapped with HTML links pointing
// to the respective declaration, if possible. Comments are
// formatted the same way as with FormatText.
func LinkifyText(w io.Writer, text []byte, n ast.Node) {}

type link

// linksFor returns the list of links for the identifiers used
// by node in the same order as they appear in the source.
func linksFor(node ast.Node) (links []link) {}