EqualValueTo checks whether two values are containing the same value or object.
(other *Value)
| 483 | |
| 484 | // EqualValueTo checks whether two values are containing the same value or object. |
| 485 | func (v *Value) EqualValueTo(other *Value) bool { |
| 486 | // comparison of uint with int fails using .Interface()-comparison (see issue #64) |
| 487 | if v.IsInteger() && other.IsInteger() { |
| 488 | return v.Integer() == other.Integer() |
| 489 | } |
| 490 | if v.IsTime() && other.IsTime() { |
| 491 | return v.Time().Equal(other.Time()) |
| 492 | } |
| 493 | return v.Interface() == other.Interface() |
| 494 | } |
| 495 | |
| 496 | type sortedKeys []reflect.Value |
| 497 |