Versions in this module Expand all Collapse all v0 v0.46.0 Nov 18, 2026 Changes in this version + type Change struct + Context []string + NewValue interface{} + OldValue interface{} + Operation ChangeOperation + Path string + type ChangeOperation string + const ChangeOpAdd + const ChangeOpRemove + const ChangeOpReplace + type DiffFormat string + const DiffFormatJSONPatch + const DiffFormatSemantic + const DiffFormatSideBySide + const DiffFormatUnified + type DiffOptions struct + Colorize bool + ContextLines int + Format DiffFormat + IgnoreMetadata bool + IgnoreOrder bool + Semantic bool + type DiffResult struct + Changes []Change + HasChanges bool + LeftLabel string + Patch string + RightLabel string + Summary DiffSummary + type DiffSummary struct + Added int + Impact ImpactLevel + Modified int + Removed int + type Differ struct + func NewDiffer(opts DiffOptions) *Differ + func (d *Differ) Compare(left, right interface{}, leftLabel, rightLabel string) (*DiffResult, error) + func (d *Differ) CompareData(leftData, rightData []byte, leftLabel, rightLabel string) (*DiffResult, error) + func (d *Differ) CompareFiles(leftPath, rightPath string) (*DiffResult, error) + func (d *Differ) WithVFS(env vfs.Env) *Differ + type Formatter interface + Format func(result *DiffResult) (string, error) + type ImpactLevel string + const ImpactCritical + const ImpactHigh + const ImpactLow + const ImpactMedium + type JSONPatchFormatter struct + func (f *JSONPatchFormatter) Format(result *DiffResult) (string, error) + type SemanticFormatter struct + func (f *SemanticFormatter) Format(result *DiffResult) (string, error) + type SideBySideFormatter struct + func (f *SideBySideFormatter) Format(result *DiffResult) (string, error) + type UnifiedFormatter struct + func (f *UnifiedFormatter) Format(result *DiffResult) (string, error)