Documentation
¶
Overview ¶
Package diff provides JSON diff computation and formatting utilities
Index ¶
Constants ¶
View Source
const MaxDiffSize = 512 * 1024 // 512KB
MaxDiffSize is the maximum size (in bytes) for detailed diff computation Files larger than this will still be compared but with simplified output
Variables ¶
This section is empty.
Functions ¶
func FormatDiff ¶
func FormatDiff(result *DiffResult, useColor bool) string
FormatDiff formats diff result for display
Types ¶
type DiffResult ¶
type DiffResult struct {
HasChanges bool
Unified string
Summary string
AddedLines int
DeletedLines int
}
DiffResult contains the result of a diff operation
func ComputeJSONDiff ¶
func ComputeJSONDiff(original, modified string) (*DiffResult, error)
ComputeJSONDiff compares two JSON strings and returns structured diff
Click to show internal directories.
Click to hide internal directories.