output

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package output provides formatters that render a RiskReport to different output formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONFormatter

type JSONFormatter struct {
	// Out is the writer to render to. Defaults to os.Stdout when nil.
	Out io.Writer
}

JSONFormatter renders scan results as JSON.

func (JSONFormatter) Render

func (f JSONFormatter) Render(report models.RiskReport) error

Render writes the scan report as indented JSON to the configured writer. Nil Findings slices are normalized to empty arrays so consumers get consistent types.

type MarkdownFormatter

type MarkdownFormatter struct {
	// Out is the writer to render to. Defaults to os.Stdout when nil.
	Out io.Writer
}

MarkdownFormatter renders scan results as GitHub-flavored Markdown.

func (MarkdownFormatter) Render

func (f MarkdownFormatter) Render(report models.RiskReport)

Render writes the scan report as Markdown to the configured writer.

type TableFormatter

type TableFormatter struct {
	// Out is the writer to render to. Defaults to os.Stdout when nil.
	Out io.Writer
	// Width overrides terminal width detection (used in tests).
	Width int
}

TableFormatter renders scan results as a colored terminal table with a summary section.

func (TableFormatter) Render

func (f TableFormatter) Render(report models.RiskReport)

Render prints the scan report as a terminal table followed by a summary panel.

Jump to

Keyboard shortcuts

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