formatter

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventOutput

func CreateEventOutput(event *models.Event, resolvedPath string, config *models.Config) models.EventOutput

func FormatDiffForWeb

func FormatDiffForWeb(diff string) string

FormatDiffForWeb takes a unified diff string and returns HTML with CSS classes and line numbers

func IsTerminalSupported

func IsTerminalSupported() bool

IsTerminalSupported checks if the current terminal supports colors

func OutputJSON

func OutputJSON(event models.EventOutput, writer *os.File, config *models.Config)

func OutputPlain

func OutputPlain(event models.EventOutput, writer *os.File, config *models.Config)

func OutputTable

func OutputTable(event models.EventOutput, writer *os.File, config *models.Config)

func PrintTableHeader

func PrintTableHeader(writer *os.File, config *models.Config)

Types

type ColoredDiffFormatter

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

ColoredDiffFormatter provides colored diff output for terminals

func NewColoredDiffFormatter

func NewColoredDiffFormatter() *ColoredDiffFormatter

NewColoredDiffFormatter creates a new colored diff formatter

func (*ColoredDiffFormatter) FormatDiff

func (f *ColoredDiffFormatter) FormatDiff(diff string) string

FormatDiff takes a unified diff string and returns a colored version

Jump to

Keyboard shortcuts

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