package
0.31.0
Repository: https://go.googlesource.com/tools
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 "golang.org/x/tools/internal/diff".
package lcs contains code to find longest-common-subsequences (and diffs).
Package myers implements the Myers diff algorithm.

# Functions

Apply applies a sequence of edits to the src buffer and returns the result.
ApplyBytes is like Apply, but it accepts a byte slice.
Bytes computes the differences between two byte slices.
Merge merges two valid, ordered lists of edits.
SortEdits orders a slice of Edits by (start, end) offset.
Strings computes the differences between two strings.
ToUnified applies the edits to content and returns a unified diff, with contextLines lines of (unchanged) context around each diff hunk.
Unified returns a unified diff of the old and new strings.

# Constants

DefaultContextLines is the number of unchanged lines of surrounding context displayed by Unified.

# Structs

An Edit describes the replacement of a portion of a text file.