report

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Summary

type Summary struct {
	Results   []*diff.DiffResult
	New       int
	Changed   int
	Unchanged int
	Deleted   int
	Total     int
}

Summary holds aggregated diff results.

func NewSummary

func NewSummary(results []*diff.DiffResult) *Summary

NewSummary creates a summary from diff results.

func (*Summary) ExitCode

func (s *Summary) ExitCode() int

ExitCode returns the appropriate exit code.

func (*Summary) HasChanges

func (s *Summary) HasChanges() bool

HasChanges returns true if there are any differences.

func (*Summary) PrintColor

func (s *Summary) PrintColor(w io.Writer)

PrintColor writes a colorized report to the writer.

func (*Summary) PrintJSON

func (s *Summary) PrintJSON(w io.Writer) error

PrintJSON writes a JSON report to the writer.

func (*Summary) PrintMarkdown added in v0.2.0

func (s *Summary) PrintMarkdown(w io.Writer)

PrintMarkdown writes a markdown-formatted report to the writer.

func (*Summary) PrintPlain added in v0.2.0

func (s *Summary) PrintPlain(w io.Writer)

PrintPlain writes a plain-text report (no ANSI colors) to the writer.

func (*Summary) PrintSummaryOnly added in v0.2.0

func (s *Summary) PrintSummaryOnly(w io.Writer)

PrintSummaryOnly writes only the summary line to the writer.

func (*Summary) PrintTable added in v0.3.0

func (s *Summary) PrintTable(w io.Writer)

PrintTable writes a table-formatted report to the writer.

Jump to

Keyboard shortcuts

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