tools: golang.org/x/tools/internal/lsp/diff Index | Files | Directories

package diff

import "golang.org/x/tools/internal/lsp/diff"

Package diff supports a pluggable diff algorithm.

Index

Package Files

apply_edits.go hooks.go myers.go

Variables

var (
    ComputeEdits func(uri span.URI, before, after string) []TextEdit
    ApplyEdits   func(before string, edits []TextEdit) string
    ToUnified    func(from, to string, before string, edits []TextEdit) string
)

func SortTextEdits Uses

func SortTextEdits(d []TextEdit)

type TextEdit Uses

type TextEdit struct {
    Span    span.Span
    NewText string
}

TextEdit represents a change to a section of a document. The text within the specified span should be replaced by the supplied new text.

Directories

PathSynopsis
difftestPackage difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "golang.org/x/tools/internal/lsp/diff"
myersPackage myers implements the Myers diff algorithm.

Package diff imports 6 packages (graph) and is imported by 8 packages. Updated 2019-09-15. Refresh now. Tools for package owners.