Like WriteUnifiedDiff but returns the diff a string.
(diff UnifiedDiff)
| 636 | |
| 637 | // Like WriteUnifiedDiff but returns the diff a string. |
| 638 | func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { |
| 639 | w := &bytes.Buffer{} |
| 640 | err := WriteUnifiedDiff(w, diff) |
| 641 | return string(w.Bytes()), err |
| 642 | } |
| 643 | |
| 644 | // Convert range to the "ed" format. |
| 645 | func formatRangeContext(start, stop int) string { |
searching dependent graphs…