Versions in this module Expand all Collapse all v1 v1.3.2 Jun 16, 2023 Changes in this version + type Diff struct + Text string + Type Operation + type DiffMatchPatch struct + DiffEditCost int + DiffTimeout time.Duration + MatchDistance int + MatchMaxBits int + MatchThreshold float64 + PatchDeleteThreshold float64 + PatchMargin int + func New() *DiffMatchPatch + func (dmp *DiffMatchPatch) DiffBisect(text1, text2 string, deadline time.Time) []Diff + func (dmp *DiffMatchPatch) DiffCharsToLines(diffs []Diff, lineArray []string) []Diff + func (dmp *DiffMatchPatch) DiffCleanupEfficiency(diffs []Diff) []Diff + func (dmp *DiffMatchPatch) DiffCleanupMerge(diffs []Diff) []Diff + func (dmp *DiffMatchPatch) DiffCleanupSemantic(diffs []Diff) []Diff + func (dmp *DiffMatchPatch) DiffCleanupSemanticLossless(diffs []Diff) []Diff + func (dmp *DiffMatchPatch) DiffCommonOverlap(text1 string, text2 string) int + func (dmp *DiffMatchPatch) DiffCommonPrefix(text1, text2 string) int + func (dmp *DiffMatchPatch) DiffCommonSuffix(text1, text2 string) int + func (dmp *DiffMatchPatch) DiffFromDelta(text1 string, delta string) (diffs []Diff, err error) + func (dmp *DiffMatchPatch) DiffHalfMatch(text1, text2 string) []string + func (dmp *DiffMatchPatch) DiffLevenshtein(diffs []Diff) int + func (dmp *DiffMatchPatch) DiffLinesToChars(text1, text2 string) (string, string, []string) + func (dmp *DiffMatchPatch) DiffLinesToRunes(text1, text2 string) ([]rune, []rune, []string) + func (dmp *DiffMatchPatch) DiffMain(text1, text2 string, checklines bool) []Diff + func (dmp *DiffMatchPatch) DiffMainRunes(text1, text2 []rune, checklines bool) []Diff + func (dmp *DiffMatchPatch) DiffPrettyHtml(diffs []Diff) string + func (dmp *DiffMatchPatch) DiffPrettyText(diffs []Diff) string + func (dmp *DiffMatchPatch) DiffText1(diffs []Diff) string + func (dmp *DiffMatchPatch) DiffText2(diffs []Diff) string + func (dmp *DiffMatchPatch) DiffToDelta(diffs []Diff) string + func (dmp *DiffMatchPatch) DiffXIndex(diffs []Diff, loc int) int + func (dmp *DiffMatchPatch) MatchAlphabet(pattern string) map[byte]int + func (dmp *DiffMatchPatch) MatchBitap(text, pattern string, loc int) int + func (dmp *DiffMatchPatch) MatchMain(text, pattern string, loc int) int + func (dmp *DiffMatchPatch) PatchAddContext(patch Patch, text string) Patch + func (dmp *DiffMatchPatch) PatchAddPadding(patches []Patch) string + func (dmp *DiffMatchPatch) PatchApply(patches []Patch, text string) (string, []bool) + func (dmp *DiffMatchPatch) PatchDeepCopy(patches []Patch) []Patch + func (dmp *DiffMatchPatch) PatchFromText(textline string) ([]Patch, error) + func (dmp *DiffMatchPatch) PatchMake(opt ...interface{}) []Patch + func (dmp *DiffMatchPatch) PatchSplitMax(patches []Patch) []Patch + func (dmp *DiffMatchPatch) PatchToText(patches []Patch) string + type Operation int8 + const DiffDelete + const DiffEqual + const DiffInsert + const IndexSeparator + func (i Operation) String() string + type Patch struct + Length1 int + Length2 int + Start1 int + Start2 int + func (p *Patch) String() string v1.3.1 Jun 16, 2023