output

package
v0.1.6 Latest Latest
Warning

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

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

Documentation

Overview

Package output provides formatting options for scan results

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVFormatter

type CSVFormatter struct{}

CSVFormatter formats results as CSV

func (*CSVFormatter) Format

func (f *CSVFormatter) Format(result *models.ScanResult) (string, error)

Format returns the formatted string

func (*CSVFormatter) Write

func (f *CSVFormatter) Write(w io.Writer, result *models.ScanResult) error

Write writes the formatted output to the writer

type Formatter

type Formatter interface {
	Format(result *models.ScanResult) (string, error)
	Write(w io.Writer, result *models.ScanResult) error
}

Formatter defines the interface for output formatters

func NewFormatter

func NewFormatter(format string) (Formatter, error)

NewFormatter creates a new formatter based on the format type

type JSONFormatter

type JSONFormatter struct {
	Pretty bool
}

JSONFormatter formats results as JSON

func (*JSONFormatter) Format

func (f *JSONFormatter) Format(result *models.ScanResult) (string, error)

Format returns the formatted string

func (*JSONFormatter) Write

func (f *JSONFormatter) Write(w io.Writer, result *models.ScanResult) error

Write writes the formatted output to the writer

type TextFormatter

type TextFormatter struct{}

TextFormatter formats results as human-readable text tables

func (*TextFormatter) Format

func (f *TextFormatter) Format(result *models.ScanResult) (string, error)

Format returns the formatted string

func (*TextFormatter) Write

func (f *TextFormatter) Write(w io.Writer, result *models.ScanResult) error

Write writes the formatted output to the writer

Jump to

Keyboard shortcuts

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