Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/andreyvit/diff
/ functions
Functions
26 in github.com/andreyvit/diff
⨍
Functions
26
◇
Types & classes
1
↓ 11 callers
Function
o
(t *testing.T, a, b, expected string)
diff_test.go:67
↓ 4 callers
Method
AddNewline
(op diffmatchpatch.Operation)
diff.go:71
↓ 2 callers
Function
CharacterDiff
CharacterDiff returns an inline diff between the two strings, using (++added++) and (~~deleted~~) markup.
diff.go:21
↓ 2 callers
Method
FlushChunk
()
diff.go:91
↓ 2 callers
Function
diff
(a, b string)
diff.go:10
↓ 1 callers
Method
AddCharacters
(text string, op diffmatchpatch.Operation)
diff.go:63
↓ 1 callers
Method
Flush
()
diff.go:101
↓ 1 callers
Function
LineDiff
LineDiff returns a normal linewise diff between the two given strings.
diff.go:46
↓ 1 callers
Function
LineDiffAsLines
LineDiffAsLines returns the lines of a linewise diff between the two given strings.
diff.go:51
↓ 1 callers
Function
TrimLines
TrimLines applies TrimSpace to each string in the given array.
trim.go:8
↓ 1 callers
Function
diffsToPatchLines
(diffs []diffmatchpatch.Diff)
diff.go:112
↓ 1 callers
Function
diffsToString
(diffs []diffmatchpatch.Diff)
diff.go:25
Function
Test_CharacterDiff_NoChanges
(t *testing.T)
diff_test.go:7
Function
Test_CharacterDiff_SomeChanges
(t *testing.T)
diff_test.go:15
Function
Test_LineDiff_AddedLine
(t *testing.T)
diff_test.go:31
Function
Test_LineDiff_AddedMultipleLines
(t *testing.T)
diff_test.go:35
Function
Test_LineDiff_DeletedLine
(t *testing.T)
diff_test.go:39
Function
Test_LineDiff_DeletedMultipleLines
(t *testing.T)
diff_test.go:43
Function
Test_LineDiff_EverythingChanged
(t *testing.T)
diff_test.go:27
Function
Test_LineDiff_NoChanges
(t *testing.T)
diff_test.go:23
Function
Test_LineDiff_ReplacedLine
(t *testing.T)
diff_test.go:47
Function
Test_LineDiff_ReplacedMultipleLines
(t *testing.T)
diff_test.go:51
Function
Test_LineDiff_ReplacedPartOfLine
(t *testing.T)
diff_test.go:55
Function
Test_LineDiff_ReplacedPartsOfMultipleConsecutiveLines
(t *testing.T)
diff_test.go:59
Function
Test_LineDiff_ReplacedTrailingPartOfLastLine
(t *testing.T)
diff_test.go:63
Function
TrimLinesInString
TrimLinesInString applies TrimSpace to each line in the given string, and returns the new trimmed string. Empty lines are not removed.
trim.go:17