output

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorizeJSON added in v0.1.8

func ColorizeJSON(raw []byte) []byte

ColorizeJSON adds ANSI colors to severity values for terminal display.

func FormatJSON added in v0.1.3

func FormatJSON(payload any, pretty bool) ([]byte, error)

FormatJSON renders the payload as JSON, optionally pretty printed.

func RenderJSONError added in v0.1.3

func RenderJSONError(specFile string, exitCode int, message string, debug *Debug) (any, jsonSummary, error)

RenderJSONError builds a JSON error response when findings cannot be produced.

func RenderJSONReport added in v0.1.3

func RenderJSONReport(specFile string, report validate.Report, exitCode int, debug *Debug) (any, jsonSummary, error)

RenderJSONReport renders a report to JSON with the required schema.

func RenderReport

func RenderReport(r validate.Report) string

Types

type Debug added in v0.1.3

type Debug struct {
	InternalError string `json:"internal_error"`
	Stacktrace    string `json:"stacktrace"`
}

Jump to

Keyboard shortcuts

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