MCPcopy Index your code
hub / github.com/pmezard/go-difflib / GetContextDiffString

Function GetContextDiffString

difflib/difflib.go:760–764  ·  view source on GitHub ↗

Like WriteContextDiff but returns the diff a string.

(diff ContextDiff)

Source from the content-addressed store, hash-verified

758
759// Like WriteContextDiff but returns the diff a string.
760func 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.

Calls 1

WriteContextDiffFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…