You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ipA and ipB has different len of their slice inside, but they still represents the same ip. however deep.Equal() say there is a diff between ipA and ipB.
not only structs may have an Equal() method.
The text was updated successfully, but these errors were encountered:
skinass
changed the title
wrong comparision for slices types with Equal() method
wrong comparison for slices types with Equal() method
Aug 2, 2019
in commit 929fce9 the check of
Equal()
function was moved under thereflect.Struct
case.and here is an example why this is wrong:
https://play.golang.org/p/AlgXufFrO1g
ipA
andipB
has different len of their slice inside, but they still represents the same ip. howeverdeep.Equal()
say there is a diff betweenipA
andipB
.not only structs may have an
Equal()
method.The text was updated successfully, but these errors were encountered: