Documentation
¶
Overview ¶
Package diff implements a difference algorithm. The algorithm is described in "An O(ND) Difference Algorithm and its Variations", Eugene Myers, Algorithmica Vol. 1 No. 2, 1986, pp. 251-266.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFileLines ¶
func PrintDiffSlices ¶
func PrintDiffSlices(src, dst []string)
Types ¶
type Change ¶
type Change struct {
A, B int // position in input a and b
Del int // delete Del elements from input a
Ins int // insert Ins elements from input b
}
A Change contains one or more deletions or inserts at one position in two sequences.
func ByteStringSlices ¶
ByteStrings returns the differences of two strings in bytes.
func ByteStrings ¶
ByteStrings returns the differences of two strings in bytes.
func Diff ¶
Diff returns the differences of data. data.Equal is called repeatedly with 0<=i<n and 0<=j<m
Click to show internal directories.
Click to hide internal directories.