Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
Diff contains diff type and bytes.
type Diffs ¶
type Diffs []Diff
Diffs is []Diff define to call func(Diffs){}.
func Get ¶
Get return difference of two []byte, using [ Myer's diff algorithm ](https://neil.fraser.name/writing/diff/myestr.pdf). Export to help users use extended options.
type Option ¶
type Option func(*options)
Option export to user for easy expansion.
func WithChecklines ¶
WithChecklines is a speedup flag, if false, then don't run a ine-level diff first to identify the changed areas, if true, then run a faster slightly less optimal diff.
func WithDeadline ¶
WithDeadline set last time when the diff should be complete by.
func WithEditcost ¶
WithEditcost expanding the length of a diff by editcost(defalut is 4)(16: size of struct diff, 4: size of patch token), then that optimisation will reduce the total costs.
func WithSemantic ¶
WithSemantic is a flag, default is false, if true make Diffs is to be human-readable.