delta

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package delta provides before/after comparison for accessibility audits. This enables the autonomous fix loop by verifying whether fixes worked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAgentResult

func LoadAgentResult(path string) (*types.AgentResult, error)

LoadAgentResult loads an AgentResult from a JSON file.

func LoadResult

func LoadResult(path string) (*types.AgentResult, error)

LoadResult loads an AgentResult from a JSON file.

func SaveAgentResult

func SaveAgentResult(result *types.AgentResult, path string) error

SaveAgentResult saves an AgentResult to a JSON file.

func SaveDelta

func SaveDelta(delta *types.ValidationDelta, path string) error

SaveDelta saves a ValidationDelta to a JSON file.

Types

type Calculator

type Calculator struct {
	// IncludeResults controls whether full before/after results are included.
	// Set to false to reduce output size.
	IncludeResults bool
}

Calculator compares audit results to produce validation deltas.

func NewCalculator

func NewCalculator() *Calculator

NewCalculator creates a delta calculator with default options.

func (*Calculator) Compare

func (c *Calculator) Compare(before, after *types.AgentResult) *types.ValidationDelta

Compare compares before and after audit results.

func (*Calculator) CompareWithExpected

func (c *Calculator) CompareWithExpected(before, after *types.AgentResult, expectedFixed []string) *types.ValidationDelta

CompareWithExpected compares results and checks expected fixes.

Jump to

Keyboard shortcuts

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