validateEqualArgs checks whether provided arguments can be safely used in the Equal/NotEqual functions.
(expected, actual interface{})
| 479 | // validateEqualArgs checks whether provided arguments can be safely used in the |
| 480 | // Equal/NotEqual functions. |
| 481 | func validateEqualArgs(expected, actual interface{}) error { |
| 482 | if expected == nil && actual == nil { |
| 483 | return nil |
| 484 | } |
| 485 | |
| 486 | if isFunction(expected) || isFunction(actual) { |
| 487 | return errors.New("cannot take func type as argument") |
| 488 | } |
| 489 | return nil |
| 490 | } |
| 491 | |
| 492 | // Same asserts that two pointers reference the same object. |
| 493 | // |
searching dependent graphs…