Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffLines ¶
func DiffLines(diff []diffmatchpatch.Diff) (ret []diffmatchpatch.Diff)
CombineIntoLines traverse through diff and creates separate per line diff for each prefix and suffix diff chunks. NOTE: This is useful to normalize output to git diff.
func PrintDMPDiff ¶
func PrintDMPDiff(diff []diffmatchpatch.Diff, contextLines int) []byte
PrintDMPDiff prints diffmatchpatch.Diff slice in git combined diff format, specified in https://git-scm.com/docs/diff-format#_combined_diff_format. It's caller responsibility to add extended header lines and git diff header if needed.
Types ¶
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
func (Diff) ToCombinedFormat ¶
ToCombinedFormat prints diff in git combined diff format, specified in https://git-scm.com/docs/diff-format#_combined_diff_format.
Click to show internal directories.
Click to hide internal directories.