Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Comparer ¶
type Comparer interface { // Eq will compare the interface values of 'a' and 'b' for equality. Eq(a, b interface{}) error }
Comparer is used to compare two values. An error means the fields are either not equal or that an error occurred in comparing them.
type DeepEqualComparer ¶
type DeepEqualComparer struct{}
DeepEqualComparer compares two objects using the deep equal operators.
func (*DeepEqualComparer) Eq ¶
func (de *DeepEqualComparer) Eq(a, b interface{}) error
Eq will compare using the reflect deep equal function.
type DefinedComparer ¶
type DefinedComparer struct{}
DefinedComparer tells whether one interface contains the defined fields of another. This operator relies on `omitempty` json tags being present in fields that shouldn't be compared when empty.
func (*DefinedComparer) Eq ¶
func (dc *DefinedComparer) Eq(a, b interface{}) error
Eq will tell whether the fields and values defined in 'a' are present in 'b'. An error mean the values are either not equal or that an error occurred in comparing them.
Click to show internal directories.
Click to hide internal directories.