Currently go-set only works with types that work as keys in a map - and the intrinsic hashing of those types are used for equality comparison.
A Set could be useful for more use cases if the user could specify how objects that get put into the set are hashed. Say for example an object implements Hash() string or HashCode() int, etc.
Currently
go-set
only works with types that work as keys in amap
- and the intrinsic hashing of those types are used for equality comparison.A
Set
could be useful for more use cases if the user could specify how objects that get put into the set are hashed. Say for example an object implementsHash() string
orHashCode() int
, etc.