MCPcopy Create free account
hub / github.com/sergi/go-diff / New

Function New

diffmatchpatch/diffmatchpatch.go:35–46  ·  view source on GitHub ↗

New creates a new DiffMatchPatch object with default parameters.

()

Source from the content-addressed store, hash-verified

33
34// New creates a new DiffMatchPatch object with default parameters.
35func New() *DiffMatchPatch {
36 // Defaults.
37 return &DiffMatchPatch{
38 DiffTimeout: time.Second,
39 DiffEditCost: 4,
40 MatchThreshold: 0.5,
41 MatchDistance: 1000,
42 PatchDeleteThreshold: 0.5,
43 PatchMargin: 4,
44 MatchMaxBits: 32,
45 }
46}

Callers 15

TestPatchFromTextFunction · 0.85
TestPatchToTextFunction · 0.85
TestPatchAddContextFunction · 0.85
TestPatchSplitMaxFunction · 0.85
TestPatchAddPaddingFunction · 0.85
TestPatchApplyFunction · 0.85
TestMatchAlphabetFunction · 0.85
TestMatchBitapFunction · 0.85
TestMatchMainFunction · 0.85
TestDiffCommonPrefixFunction · 0.85

Calls

no outgoing calls

Tested by 15

TestPatchFromTextFunction · 0.68
TestPatchToTextFunction · 0.68
TestPatchAddContextFunction · 0.68
TestPatchSplitMaxFunction · 0.68
TestPatchAddPaddingFunction · 0.68
TestPatchApplyFunction · 0.68
TestMatchAlphabetFunction · 0.68
TestMatchBitapFunction · 0.68
TestMatchMainFunction · 0.68
TestDiffCommonPrefixFunction · 0.68