Versions in this module Expand all Collapse all v0 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + const DefMatchLen + const DefMatchRatio + const LevelLines + const LevelWords + var DefDelimiter = byte('\n') + func Bytes(old, new []byte, atx, aty int) (adds, dels text.Chunks) + func BytesRatio(old, newline []byte, minTokenLen int) (ratio float32, m int, maxlen int) + func IsEqual(oldb, newb []byte) (equal bool) + func ReadLines(f string) (lines text.Lines, e error) + type Data struct + Adds text.Lines + Changes LineChanges + Dels text.Lines + IsMatched bool + func Files(oldf, newf string, level int) (diffs Data, e error) + func Lines(oldlines, newlines text.Lines, level int) (diffs Data) + func Text(before, after []byte, level int) (diffs Data) + func (diffs *Data) GetAllAdds() (chunks text.Chunks) + func (diffs *Data) GetAllDels() (chunks text.Chunks) + func (diffs *Data) PushAdd(new text.Line) + func (diffs *Data) PushChange(old, new text.Line) + func (diffs *Data) PushDel(old text.Line) + func (diffs Data) String() (s string) + type LineChange struct + Adds text.Chunks + Dels text.Chunks + New text.Line + Old text.Line + func NewLineChange(old, new text.Line) *LineChange + func (change LineChange) String() string + type LineChanges []LineChange + func (changes *LineChanges) GetAllAdds() (allAdds text.Chunks) + func (changes *LineChanges) GetAllDels() (allDels text.Chunks)