golang-set
golang-set copied to clipboard
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.
When using `json.Unmarshal` to deserialize a set of type `UnsafeThreadSet`, a panic is raised. Related to this comment: https://github.com/deckarep/golang-set/pull/121#issuecomment-1617551530 An example can be found here: https://go.dev/play/p/WgjZEwrHk5U This was working prior...
I'm finding quite a bit of code needs to do things like take a set and make a new set but with one extra element, or with one element removed....
1. If I never call `it.Stop()` on an Iterator, what happens, does that possibly cause a memory leak? If so, I'd love to have that explicitly called out in documentation....
Just like `mapset.NewSetFromMapKeys()` which is very handy. I think `mapset.NewSetFromSlice` will be quite helpful
I use the testify/assert package in unit testing and they have a very helpful ability to compare two structs based only on exported values. This makes it possible for me...
Resolves #122 Unit tests have been added to confirm this based on the provided examples. Also includes examples of unmarshaling a struct with a Set property, as well as a...
Adds implementation of bson.Marshaler interface to Sets. Also addresses a locking inconsistency in UnmarshalJSON. BSON support is important for our use cases, and should be a good improvement to this...
> What is considered comparable in Go? > * `Structs` if _all of their fields_ are also comparable independently Would be great to be able to pass a key (or...
Hi @deckarep, I want to contribute the PR for supporting 1.23 iterator. I don't know if you are interested. # Background The Iterator implemented in this package returns a channel...
This PR use to discussion.