output

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package output writes scan output to a file or, when no path is given, to stdout. Writer wraps the destination (handling creation and closing), and MergeJSONResults combines multiple API JSON responses into a single JSON object.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeJSONResults

func MergeJSONResults(results []string) (string, error)

MergeJSONResults combines multiple JSON responses from the API into a single JSON object

Types

type Writer

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

Writer handles writing results to console or file

func NewWriter

func NewWriter(outputPath string) (*Writer, error)

NewWriter creates a new writer If outputPath is empty, writes to stdout

func (*Writer) Close

func (w *Writer) Close() error

Close closes the writer if it's a file

func (*Writer) Write

func (w *Writer) Write(content string) error

Write writes content to the configured destination

func (*Writer) WriteFormat

func (w *Writer) WriteFormat(format string, args ...interface{}) error

WriteFormat writes formatted content

Jump to

Keyboard shortcuts

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