MCPcopy Create free account
hub / github.com/cogentcore/core / GetUnifiedDiffString

Function GetUnifiedDiffString

texteditor/difflib/difflib.go:903–907  ·  view source on GitHub ↗

GetUnifiedDiffString is like WriteUnifiedDiff but returns the diff a string.

(diff LineDiffParams)

Source from the content-addressed store, hash-verified

901
902// GetUnifiedDiffString is like WriteUnifiedDiff but returns the diff a string.
903func GetUnifiedDiffString(diff LineDiffParams) (string, error) {
904 w := &bytes.Buffer{}
905 err := WriteUnifiedDiff(w, diff)
906 return w.String(), err
907}
908
909// Convert range to the "ed" format.
910func formatRangeContext(start, stop int) string {

Calls 2

StringMethod · 0.95
WriteUnifiedDiffFunction · 0.70