Documentation
¶
Index ¶
Constants ¶
View Source
const UnifiedTimeFormat = "2006-01-02 15:04:05.000000000 -0700"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffTarget ¶
func NewDiffTarget ¶
func NewDiffTarget(path string) *DiffTarget
func (*DiffTarget) LoadStat ¶
func (t *DiffTarget) LoadStat() error
func (*DiffTarget) ReadText ¶
func (t *DiffTarget) ReadText() (string, error)
type LineDiff ¶
func GetLineDiffsFromDMP ¶
func GetLineDiffsFromDMP(diffs []diffmatchpatch.Diff) []LineDiff
dmp := diffmatchpatch.New() runes1, runes2, lineArray := dmp.DiffLinesToRunes(text1, text2) diffs := dmp.DiffMainRunes(runes1, runes2, false) diffs = dmp.DiffCharsToLines(diffs, lineArray) lineDiffs := difffmt.GetLineDiffsFromDMP(diffs)
type Operation ¶
type Operation int8
func GetOperationFromDMP ¶
func GetOperationFromDMP(operation diffmatchpatch.Operation) Operation
type UnifiedFormat ¶
func (UnifiedFormat) Fprint ¶
func (u UnifiedFormat) Fprint(w io.Writer, targetA *DiffTarget, targetB *DiffTarget, hunks []Hunk)
func (UnifiedFormat) Print ¶
func (u UnifiedFormat) Print(targetA *DiffTarget, targetB *DiffTarget, hunks []Hunk)
func (UnifiedFormat) Sprint ¶
func (u UnifiedFormat) Sprint(targetA *DiffTarget, targetB *DiffTarget, hunks []Hunk) string
Click to show internal directories.
Click to hide internal directories.