Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶
Copy is Equal but also checks that none of the direct fields have a zero value and none of the direct fields point to the same object. This catches regressions where a new field is added without adding that field to the Copy method. Arguments must be structs. Does not check private fields.
func Diff ¶
func Diff(x, y interface{}) string
Diff determines whether the two values are DeepEqual. If they are not equal, it returns a string diff of the two, otherwise it returns the empty string.
func Equal ¶
Equal fails the test if the two objects do not pass a modified version of reflect.DeepEqual. The modification (see infra/go/deepequal) will use the .Equal() method if defined on the type. This is necessary for comparing structs that might differ on unexported fields, but be practically the same. This concretely comes up often when deserialzing a time.Time, but applies in a few other situations as well.
Types ¶
This section is empty.