1package udiff
2
3// UnifiedDiff is a unified diff.
4type UnifiedDiff = unified
5
6// Hunk represents a single hunk in a unified diff.
7type Hunk = hunk
8
9// Line represents a single line in a hunk.
10type Line = line
11
12// ToUnifiedDiff takes a file contents and a sequence of edits, and calculates
13// a unified diff that represents those edits.
14func ToUnifiedDiff(fromName, toName string, content string, edits []Edit, contextLines int) (UnifiedDiff, error) {
15 return toUnified(fromName, toName, content, edits, contextLines)
16}