validateEqualArgs checks whether provided arguments can be safely used in the Equal/NotEqual functions.
(expected, actual interface{})
| 515 | // validateEqualArgs checks whether provided arguments can be safely used in the |
| 516 | // Equal/NotEqual functions. |
| 517 | func validateEqualArgs(expected, actual interface{}) error { |
| 518 | if expected == nil && actual == nil { |
| 519 | return nil |
| 520 | } |
| 521 | |
| 522 | if isFunction(expected) || isFunction(actual) { |
| 523 | return errors.New("cannot take func type as argument") |
| 524 | } |
| 525 | return nil |
| 526 | } |
| 527 | |
| 528 | // Same asserts that two pointers reference the same object. |
| 529 | // |
searching dependent graphs…