...

Package myers

import "golang.org/x/tools/internal/diff/myers"
Overview
Index

Overview ▾

Package myers implements the Myers diff algorithm.

func ComputeEdits

func ComputeEdits(before, after string) []diff.Edit

ComputeEdits returns the diffs of two strings using a simple line-based implementation, like diff.Strings.

Deprecated: this implementation is moribund. However, when diffs appear in marker test expectations, they are the particular diffs produced by this implementation. The marker test framework asserts diff(orig, got)==wantDiff, but ideally it would compute got==apply(orig, wantDiff) so that the notation of the diff is immaterial.