Documentation
¶
Overview ¶
Package report builds and serializes crawl reports (JSON, CSV, and HTML).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Explanation ¶
type Explanation struct {
// What the issue entails — a plain-language description of the finding.
What string
// Impact — why it matters / the potential consequence if left unaddressed.
Impact string
// Fix — the recommended remediation.
Fix string
}
Explanation describes a single issue code in plain language: what the finding means, why it matters, and what to do about it. It is keyed by an Issue's Code and surfaced in the HTML report so a reader can act on a finding without consulting external documentation.
type HTMLReporter ¶
type HTMLReporter struct{}
HTMLReporter writes a self-contained HTML report (inline CSS, no external assets) suitable for opening in a browser or sharing as an artifact.
type Report ¶
type Report struct {
Seed string `json:"seed"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
PagesCrawled int `json:"pages_crawled"`
Summary Summary `json:"summary"`
Issues []analyze.Issue `json:"issues"`
// Notes carries human-readable advisories about the run itself (e.g. analyzers skipped
// because of a conflicting option), not page findings. Omitted when empty.
Notes []string `json:"notes,omitempty"`
// SiteMap is the crawled site as a tree, annotated with the issues found on each page. It
// powers the "Site map" tab of the HTML report and the optional sitemap.xml side output.
// It is serialized so a JSON report is a complete artifact that `gocrawl render` can turn
// back into HTML (including the Site map tab) without recrawling.
SiteMap *sitemapgen.Map `json:"site_map,omitempty"`
}
Report is the serializable result of a crawl plus analysis.
func (*Report) SummaryLines ¶
SummaryLines returns a short human-readable summary for stderr.
Click to show internal directories.
Click to hide internal directories.