deckarep / golang-set

A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.
Other
4.15k stars 274 forks source link

Missing support Len()/Count()/Size() method? #105

Closed jordaniversen closed 1 year ago

jordaniversen commented 1 year ago

Is this intentional or am I missing it?

Thank you

nikist97 commented 1 year ago

I am not a maintainer, but from my experience with the package I believe you are looking for Cardinality()

jordaniversen commented 1 year ago

I just stumbled on that as well, thanks @nikist97.

Closing this as per https://github.com/deckarep/golang-set/blob/main/set.go#L47