Src computes and returns the source text
(diffs []diffmatchpatch.Diff)
| 51 | |
| 52 | // Src computes and returns the source text |
| 53 | func Src(diffs []diffmatchpatch.Diff) string { |
| 54 | var text bytes.Buffer |
| 55 | for _, d := range diffs { |
| 56 | if d.Type != diffmatchpatch.DiffInsert { |
| 57 | text.WriteString(d.Text) |
| 58 | } |
| 59 | } |
| 60 | return text.String() |
| 61 | } |