Go stdlib package — go/doc. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.Examples()NeutralExamples(testFiles *ast.File) []*Example
Examples returns the examples found in testFiles, sorted by Name field.
.IsPredeclared()NeutralIsPredeclared(s string) bool
IsPredeclared reports whether s is a predeclared identifier.
.New()NeutralNew(pkg *ast.Package, importPath string, mode Mode) *Package
New computes the package documentation for the given package AST.
.NewFromFiles()NeutralNewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts any) (*Package, error)
NewFromFiles computes documentation for a package.
.Package.Filter()NeutralPackage.Filter(f Filter)
Filter eliminates documentation for names that don't pass through the filter f.
.Package.HTML()NeutralPackage.HTML(text string) []byte
HTML returns formatted HTML for the doc comment text.
.Package.Markdown()NeutralPackage.Markdown(text string) []byte
Markdown returns formatted Markdown for the doc comment text.
.Package.Parser()NeutralPackage.Parser() *comment.Parser
Parser returns a doc comment parser configured
.Package.Printer()NeutralPackage.Printer() *comment.Printer
Printer returns a doc comment printer configured
.Package.Synopsis()NeutralPackage.Synopsis(text string) string
Synopsis returns a cleaned version of the first sentence in text.
| FQN | Field | |
|---|---|---|
| go/doc | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # go/doc