Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
reflect.DeepEqual varient that returns an error describing the inequality #39652
currently, DeepEqual is just a bool that returns true/false if things are equal or not. However, as has been seen in the past via Qs (ex "while is an empty map and a nil map not equal according to DeepEquall") as well as that it can be difficult to understand deeply nested structures for why they are not equal. It be useful (at least during development) to have a varient that returned the reason for DeepEqual returning false.
The primary reason I can see for not wanting to do it is that since it be more expensive, you would probably want to do it as a separate implementation from DeepEqual which would involve code duplication and if one doesn't view it gaining them a lot.