Like WriteContextDiff but returns the diff a string.
(diff ContextDiff)
| 761 | |
| 762 | // Like WriteContextDiff but returns the diff a string. |
| 763 | func GetContextDiffString(diff ContextDiff) (string, error) { |
| 764 | w := &bytes.Buffer{} |
| 765 | err := WriteContextDiff(w, diff) |
| 766 | return string(w.Bytes()), err |
| 767 | } |
| 768 | |
| 769 | // Split a string on "\n" while preserving them. The output can be used |
| 770 | // as input for UnifiedDiff and ContextDiff structures. |
searching dependent graphs…