Documentation
¶
Overview ¶
Package diff provides structural comparison of UISpec PageSpecs, producing a list of changes suitable for code review or audit trails.
Index ¶
Constants ¶
View Source
const ( Added = "added" Removed = "removed" Modified = "modified" )
ChangeType classifies a diff entry.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
Path string `json:"path"`
Type string `json:"type"`
Old any `json:"old,omitempty"`
New any `json:"new,omitempty"`
}
Change represents a single structural difference.
type DiffResult ¶
type DiffResult struct {
Changes []Change `json:"changes"`
}
DiffResult holds the complete set of changes between two PageSpecs.
func PageSpecs ¶
func PageSpecs(a, b *uispec.PageSpec) *DiffResult
PageSpecs compares two PageSpecs and returns all structural differences.
func (*DiffResult) HasChanges ¶
func (r *DiffResult) HasChanges() bool
HasChanges reports whether any differences were found.
func (*DiffResult) Summary ¶
func (r *DiffResult) Summary() string
Summary returns a human-readable summary of the diff.
Click to show internal directories.
Click to hide internal directories.