outputdiff

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package outputdiff compares recorded and reproduced task output maps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Key        string `json:"key"`
	Recorded   string `json:"recorded"`
	Reproduced string `json:"reproduced"`
}

Change is a key whose recorded and reproduced values differ.

type Diff

type Diff struct {
	Added   []Entry  `json:"added,omitempty"`
	Removed []Entry  `json:"removed,omitempty"`
	Changed []Change `json:"changed,omitempty"`
}

Diff is the deterministic comparison of recorded vs reproduced outputs.

func Compare

func Compare(recorded, reproduced map[string]string) Diff

Compare computes the output diff. Inputs are treated as immutable.

func (Diff) Empty

func (d Diff) Empty() bool

Empty reports whether the two output maps matched exactly.

func (Diff) Render

func (d Diff) Render() string

Render returns deterministic human-readable diff text.

type Entry

type Entry struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Entry is a key/value output present on only one side of a comparison.

Jump to

Keyboard shortcuts

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