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: https://hsiaofongw.notion.site/golang-channel-f9d43933c78b4b85ab2459c13f023497
This site is only for collection, and the copyright belongs to the original author.