Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Separator = "\n"
Separator is the separator of lines.
Functions ¶
This section is empty.
Types ¶
type DiffOperation ¶
type DiffOperation struct { Op string // "+" for add, "-" for delete, " " for no change Text string }
DiffOperation represents a single operation in a diff.
type DiffOperations ¶
type DiffOperations []DiffOperation
DiffOperations represents a collection of DiffOperation.
func Diff ¶
func Diff(before, after string) DiffOperations
diff returns a slice of DiffOp representing the diff of two slices.
func (DiffOperations) String ¶
func (diffOps DiffOperations) String() string
Click to show internal directories.
Click to hide internal directories.