package
0.0.0-20220218190644-4958d6d39439
Repository: https://github.com/jhump/golang-x-tools.git
Documentation: pkg.go.dev

# Packages

Package difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "github.com/jhump/golang-x-tools/internal/lsp/diff".
Package myers implements the Myers diff algorithm.

# Functions

ApplyEdits applies the set of edits to the before and returns the resulting content.
LineEdits takes a set of edits and expands and merges them as necessary to ensure that there are only full line edits left when it is done.
SortTextEdits attempts to order all edits by their starting points.
ToUnified takes a file contents and a sequence of edits, and calculates a unified diff that represents those edits.

# Constants

Delete is the operation kind for a line that is present in the input but not in the output.
Equal is the operation kind for a line that is the same in the input and output, often used to provide context around edited lines.
Insert is the operation kind for a line that is new in the output.

# Structs

Hunk represents a contiguous set of line edits to apply.
Line represents a single line operation to apply as part of a Hunk.
TextEdit represents a change to a section of a document.
Unified represents a set of edits as a unified diff.

# Type aliases

ComputeEdits is the type for a function that produces a set of edits that convert from the before content to the after content.
OpKind is used to denote the type of operation a line represents.