format

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOutput

func FormatOutput(content string, format OutputFormat) (string, error)

FormatOutput formats the given content according to the specified format

Types

type OutputFormat

type OutputFormat string

OutputFormat represents the format for non-interactive mode output

const (
	// TextFormat is plain text output (default)
	TextFormat OutputFormat = "text"

	// JSONFormat is output wrapped in a JSON object
	JSONFormat OutputFormat = "json"
)

func (OutputFormat) IsValid

func (f OutputFormat) IsValid() bool

IsValid checks if the output format is valid

func (OutputFormat) String

func (f OutputFormat) String() string

String returns the string representation of the output format

Jump to

Keyboard shortcuts

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