MCPcopy Create free account
hub / github.com/go-git/go-git / Dst

Function Dst

utils/diff/diff.go:42–50  ·  view source on GitHub ↗

Dst computes and returns the destination text.

(diffs []diffmatchpatch.Diff)

Source from the content-addressed store, hash-verified

40
41// Dst computes and returns the destination text.
42func Dst(diffs []diffmatchpatch.Diff) string {
43 var text bytes.Buffer
44 for _, d := range diffs {
45 if d.Type != diffmatchpatch.DiffDelete {
46 text.WriteString(d.Text)
47 }
48 }
49 return text.String()
50}
51
52// Src computes and returns the source text
53func Src(diffs []diffmatchpatch.Diff) string {

Callers 1

TestAllMethod · 0.92

Calls 1

StringMethod · 0.65

Tested by 1

TestAllMethod · 0.74