package diff

import "go-hep.org/x/hep/internal/diff"

Package diff provides basic text comparison (like Unix's diff(1)).

Index

Functions

func Files

func Files(got, want string) error

Files returns a formatted diff of the two texts from the provided two file names. Files returns nil if they compare equal.

func Format

func Format(got, want string) string

Format returns a formatted diff of the two texts, showing the entire text and the minimum line-level additions and removals to turn got into want. (That is, lines only in got appear with a leading -, and lines only in want appear with a leading +.)

Source Files

diff.go

Version
v0.37.1 (latest)
Published
Jun 3, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
16 hours ago

Tools for package owners.