PatchToText takes a list of patches and returns a textual representation.
(patches []Patch)
| 467 | |
| 468 | // PatchToText takes a list of patches and returns a textual representation. |
| 469 | func (dmp *DiffMatchPatch) PatchToText(patches []Patch) string { |
| 470 | var text bytes.Buffer |
| 471 | for _, aPatch := range patches { |
| 472 | _, _ = text.WriteString(aPatch.String()) |
| 473 | } |
| 474 | return text.String() |
| 475 | } |
| 476 | |
| 477 | // PatchFromText parses a textual representation of patches and returns a List of Patch objects. |
| 478 | func (dmp *DiffMatchPatch) PatchFromText(textline string) ([]Patch, error) { |