func Compare(a1, a2 interface{}) (bool, string) {
	if a1 == nil || a2 == nil {
		return a1 == a2, "nil values are of different types"
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false, "values are of different types"
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}
// Compare tests for deep equality. It uses normal == equality where
// possible but will scan elements of arrays, slices, maps, and fields of
// structs. In maps, keys are compared with == but elements use deep
// equality. DeepEqual correctly handles recursive types. Functions are equal
// only if they are both nil.
// An empty slice is not equal to a nil slice.
Compare tests for deep equality. It uses normal == equality where
possible but will scan elements of arrays, slices, maps, and fields of
structs. In maps, keys are compared with == but elements use deep
equality. DeepEqual correctly handles recursive types. Functions are equal
only if they are both nil.
An empty slice is not equal to a nil slice.
// Compare tests for deep equality . It uses normal == equality where // possible but will scan elements of arrays slices maps and fields of // structs . In maps keys are compared with == but elements use deep // equality . DeepEqual correctly handles recursive types . Functions are equal // only if they are both nil . // An empty slice is not equal to a nil slice .
func Compare(a1, a2 interface{}) (bool, string) {
	if a1 == nil || a2 == nil {
		return a1 == a2, "nil values are of different types"
	}
	v1 := reflect.ValueOf(a1)
	v2 := reflect.ValueOf(a2)
	if v1.Type() != v2.Type() {
		return false, "values are of different types"
	}
	return deepValueEqual(v1, v2, make(map[visit]bool), 0)
}
func Compare ( a1 , a2 interface { } ) ( bool , string ) { if a1 == nil || a2 == nil { return a1 == a2 , " " } v1 := reflect . ValueOf ( a1 ) v2 := reflect . ValueOf ( a2 ) if v1 . Type ( ) != v2 . Type ( ) { return false , " " } return deepValueEqual ( v1 , v2 , make ( map [ visit ] bool ) , 0 ) }
Compare tests for deep equality.
Compare tests for deep equality .