mirror of
https://github.com/neilotoole/sq.git
synced 2024-11-28 21:11:48 +03:00
1ea24dac4a
* "sq diff" initial implementation * Refactor "cli" pkg.
11 lines
371 B
Go
11 lines
371 B
Go
package udiff
|
|
|
|
// UnifiedDiff is a unified diff.
|
|
type UnifiedDiff = unified
|
|
|
|
// ToUnifiedDiff takes a file contents and a sequence of edits, and calculates
|
|
// a unified diff that represents those edits.
|
|
func ToUnifiedDiff(fromName, toName, content string, edits []Edit, numLines int) (UnifiedDiff, error) {
|
|
return toUnified(fromName, toName, content, edits, numLines)
|
|
}
|