func IsEqual()

in isdef/core.go [12:27]


func IsEqual(to interface{}) IsDef {
	toV := reflect.ValueOf(to)
	isDefFactory, ok := equalChecks[toV.Type()]

	// If there are no handlers declared explicitly for this type we perform a deep equality check
	if !ok {
		return IsDeepEqual(to)
	}

	// We know this is an isdef due to the Register check previously
	checker := isDefFactory.Call([]reflect.Value{toV})[0].Interface().(IsDef).Checker

	return Is("equals", func(path llpath.Path, v interface{}) *llresult.Results {
		return checker(path, v)
	})
}