Comparison based on golang channel implementation

Original link:


This article introduces how to use golang channel to achieve comparison. By implementing the Walkable interface and the IsEqual function, any type that implements the Walkable interface can be compared, including custom structures, trees, slices, files, etc. As long as a type is Walkable, and the value visited during the Walk can represent itself, it can be compared in the above way.

This article is transferred from:
This site is only for collection, and the copyright belongs to the original author.