diff

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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