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 is a result of comparison operation. Provides list of items that describe difference between objects piece by piece
func Compare ¶
func Compare(a, b interface{}) Diff
Compare produces list of diff items that define difference between objects "a" and "b". Note: if objects are equal, all diff items will have Resolution of type TypeEquals
type DiffItem ¶
type DiffItem struct { Key string ValueA interface{} Resolution ResolutionType ValueB interface{} }
DiffItem defines a difference between 2 items with resolution type
type ResolutionType ¶
type ResolutionType int
ResolutionType defines a type of comparison: equality, non-equality, new sub-diff and so on
const ( TypeEquals ResolutionType = iota TypeNotEquals TypeAdded TypeRemoved TypeDiff )
Click to show internal directories.
Click to hide internal directories.