textdiff

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

Package textdiff renders plain line diffs of small, human-reviewed texts such as golden files. It is shared by the test harness (want.yaml mismatches) and the static check core (XRD golden drift).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lines

func Lines(want, got string) string

Lines renders a plain line diff between two texts: unchanged lines are prefixed with two spaces, removals with "- ", additions with "+ ". Golden files are small and reviewed by humans, so a full LCS diff with complete context reads better than a windowed unified diff.

func Normalize

func Normalize(data []byte) string

Normalize strips carriage returns and enforces one trailing newline so golden comparison is stable across platforms and editors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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