Commit c25a1be0 authored by Daniel Smith's avatar Daniel Smith

Merge pull request #6345 from thockin/equalities_bug

Remove dead, buggy code
parents cdd6d0f3 c63f4c71
......@@ -71,23 +71,6 @@ func (e Equalities) AddFunc(eqFunc interface{}) error {
return nil
}
// Equal return true if a matching equality function thinks a == b;
// if there is no matching equality function, it calls the standard
// go == operator.
func (e Equalities) Equal(a, b interface{}) bool {
av, bv := reflect.ValueOf(a), reflect.ValueOf(a)
if !av.IsValid() || !av.IsValid() {
return av.IsValid() == av.IsValid()
}
if av.Type() != av.Type() {
return false
}
if fv, ok := e[av.Type()]; ok {
return fv.Call([]reflect.Value{av, bv})[0].Bool()
}
return av.Interface() == bv.Interface()
}
// Below here is forked from go's reflect/deepequal.go
// During deepValueEqual, must keep track of checks that are
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment