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