diff

package
v1.3.187 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasChanges

func HasChanges(old, new string) bool

HasChanges returns true if old and new content differ.

func Stats added in v1.3.181

func Stats(old, new string) string

Stats returns a human-readable summary of changes.

func UnifiedDiff

func UnifiedDiff(old, new string, contextLines int) string

UnifiedDiff generates a unified diff string between old and new content. contextLines controls how many unchanged lines surround each change. For very large files (>5000 combined lines), falls back to showing only the first N changed lines to avoid OOM and TUI freeze.

Types

This section is empty.

Jump to

Keyboard shortcuts

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