MCPcopy
hub / github.com/expr-lang/expr / GetUnifiedDiffString

Function GetUnifiedDiffString

internal/difflib/difflib.go:638–642  ·  view source on GitHub ↗

Like WriteUnifiedDiff but returns the diff a string.

(diff UnifiedDiff)

Source from the content-addressed store, hash-verified

636
637// Like WriteUnifiedDiff but returns the diff a string.
638func 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.
645func formatRangeContext(start, stop int) string {

Callers 6

diffFunction · 0.92
TestOmitFilenamesFunction · 0.85

Calls 1

WriteUnifiedDiffFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…