File: export.go

package info (click to toggle)
golang-github-aymanbagabas-go-udiff 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: sh: 15; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
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 string, content string, edits []Edit, contextLines int) (UnifiedDiff, error) {
	return toUnified(fromName, toName, content, edits, contextLines)
}