table

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package table provides a human-readable table output formatter for terminal display.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// ShowRaw, when true, appends a trailing RAW column holding the unredacted
	// secret value. When false, no RAW column is emitted at all.
	ShowRaw bool

	// ColorEnabled, when true, wraps severity text with ANSI color codes.
	// Should be enabled only when writing to a terminal, not to files.
	ColorEnabled bool
}

Formatter outputs findings as a human-readable table for terminal display.

func (*Formatter) FileExtension

func (f *Formatter) FileExtension() string

FileExtension returns the text file extension.

func (*Formatter) Format

func (f *Formatter) Format(w io.Writer, findings []finding.Finding) error

Format writes findings as a formatted table to the given writer. Columns: SEVERITY | DETECTOR | FILE | REDACTED | STATUS | REMEDIATION When ShowRaw is true, a trailing RAW column is appended. A summary line is appended at the bottom.

Jump to

Keyboard shortcuts

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