tools: Index | Files | Directories

package diff

import ""

Package diff supports a pluggable diff algorithm.


Package Files

apply_edits.go hooks.go myers.go


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.


difftestPackage difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by ""
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.