sq/cli/diff/internal/go-udiff/export.go
Neil O'Toole 1ea24dac4a
#229: sq diff core (#230)
* "sq diff" initial implementation

* Refactor "cli" pkg.
2023-05-19 08:24:18 -06:00

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)
}