Documentation
¶
Overview ¶
Package diff builds a deterministic unified diff from original writable file state to the current candidate. It does not overlay candidates or touch the repository.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDuplicatePath means one input lists the same path more than once. ErrDuplicatePath = errors.New("duplicate path") // ErrInconsistent means the original and candidate path sets differ. ErrInconsistent = errors.New("inconsistent file universe") )
Functions ¶
func LineChanges ¶
LineChanges counts approximate inserted and deleted lines from before to after. Lines keep their terminators. A missing final newline stays distinct. An empty string has no lines. Equal texts produce zero counts.
Types ¶
Click to show internal directories.
Click to hide internal directories.