Standard Library

GoDocComment

Go stdlib package — go/doc/comment. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.DefaultLookupPackage()Neutral
#
Signature
DefaultLookupPackage(name string) (string, bool)

DefaultLookupPackage is the default package lookup

.DocLink.DefaultURL()Neutral
#
Signature
DocLink.DefaultURL(baseURL string) string

DefaultURL constructs and returns the documentation URL for l,

.Heading.DefaultID()Neutral
#
Signature
Heading.DefaultID() string

DefaultID returns the default anchor ID for the heading h.

.List.BlankBefore()Neutral
#
Signature
List.BlankBefore() bool

BlankBefore reports whether a reformatting of the comment

.List.BlankBetween()Neutral
#
Signature
List.BlankBetween() bool

BlankBetween reports whether a reformatting of the comment

.Parser.Parse()Neutral
#
Signature
Parser.Parse(text string) *Doc

Parse parses the doc comment text and returns the *Doc form.

.Printer.Comment()Neutral
#
Signature
Printer.Comment(d *Doc) []byte

Comment returns the standard Go formatting of the Doc,

.Printer.HTML()Neutral
#
Signature
Printer.HTML(d *Doc) []byte

HTML returns an HTML formatting of the Doc.

.Printer.Markdown()Neutral
#
Signature
Printer.Markdown(d *Doc) []byte

Markdown returns a Markdown formatting of the Doc.

.Printer.Text()Neutral
#
Signature
Printer.Text(d *Doc) []byte

Text returns a textual formatting of the Doc.

Fully-Qualified Names

FQNField
go/doc/commentfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # go/doc/comment