Documentation ¶
Overview ¶
Package diff implements a linewise diff algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chunk ¶
Chunk represents a piece of the diff. A chunk will not have both added and deleted lines. Equal lines are always after any added or deleted lines. A Chunk may or may not have any lines in it, especially for the first or last chunk in a computation.
func DiffChunks ¶
DiffChunks uses an O(D(N+M)) shortest-edit-script algorithm to compute the edits required from A to B and returns the edit chunks.
Click to show internal directories.
Click to hide internal directories.