report

package
v0.0.0-...-33f6857 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset   = "\033[0m"
	ColorRed     = "\033[31m"
	ColorGreen   = "\033[32m"
	ColorYellow  = "\033[33m"
	ColorBlue    = "\033[34m"
	ColorMagenta = "\033[35m"
	ColorCyan    = "\033[36m"
	ColorWhite   = "\033[37m"
	ColorBold    = "\033[1m"
	ColorDim     = "\033[2m"
)

ANSI 颜色代码

View Source
const (
	IconSuccess  = "✓"
	IconWarning  = "⚠"
	IconError    = "✗"
	IconInfo     = "ℹ"
	IconCritical = "☠"
	IconScan     = "🔍"
	IconShield   = "🛡"
)

图标

View Source

Variables

This section is empty.

Functions

func GenerateHTML

func GenerateHTML(results []core.Result, filename string) error

Types

type BeautifulReporter

type BeautifulReporter struct {
	// contains filtered or unexported fields
}

func NewBeautifulReporter

func NewBeautifulReporter() *BeautifulReporter

func (*BeautifulReporter) AddResult

func (r *BeautifulReporter) AddResult(result core.Result)

func (*BeautifulReporter) PrintBanner

func (r *BeautifulReporter) PrintBanner()

func (*BeautifulReporter) PrintFooter

func (r *BeautifulReporter) PrintFooter()

func (*BeautifulReporter) PrintPluginComplete

func (r *BeautifulReporter) PrintPluginComplete(pluginName string, duration time.Duration, findingCount int)

func (*BeautifulReporter) PrintPluginStart

func (r *BeautifulReporter) PrintPluginStart(pluginName string, ruleCount int)

func (*BeautifulReporter) PrintResults

func (r *BeautifulReporter) PrintResults()

func (*BeautifulReporter) PrintSection

func (r *BeautifulReporter) PrintSection(title string)

func (*BeautifulReporter) PrintSummary

func (r *BeautifulReporter) PrintSummary()

type ReportData

type ReportData struct {
	GeneratedAt string
	Stats       map[string]int
	Results     []core.Result
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL