golang-set icon indicating copy to clipboard operation
golang-set copied to clipboard

A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.

Results 27 golang-set issues
Sort by recently updated
recently updated
newest added

This PR implements `Append` method and resolves #92 . Test results: ```shell $ go test -cover PASS coverage: 94.8% of statements ok github.com/deckarep/golang-set/v2 0.767s ```

The internals of this library use a downcast of the Set interface to `*threadSafeSet` and `*threadUnsafeSet` everywhere. I'm unclear why an interface is used in this package when the logic...

I added `github.com/google/gofuzz` to do fuzzy testing. If you are against it, then I will remove the dependency and hardcode the test input, but that makes the testing less resilient....

Hello, I was wondering what your thoughts were on adding a func to create a Set from Map `mapset.NewSetFromMapKey[T](map[T]any)` `mapset.NewSetFromMapValue[T](map[any]T)` I find myself doing this often. Thought others might as...

We've got `NewSet(vals...T)` for creating a set from multiple values. But today I found myself wanting to add a slice of objects to an existing set... today I have to...

> It's helpful if everyone using the package can use the same name to refer to its contents, which implies that the package name should be good: short, concise, evocative....

Recently I use golang-set to help optimize a DFA generator. And I noticed DFA‘s compile time increased a lot. New code: ![image](https://user-images.githubusercontent.com/1579850/43064265-fe6a2748-8e90-11e8-97bc-d2a3f7670b22.png) Before: ![image](https://user-images.githubusercontent.com/1579850/43053710-b5bf93f0-8e60-11e8-9b69-21c824b6b6ec.png) After: ![image](https://user-images.githubusercontent.com/1579850/43064382-568685e8-8e91-11e8-8ceb-bc7403f0edbe.png) pprof: ![image](https://user-images.githubusercontent.com/1579850/43064445-7c8edc40-8e91-11e8-90d9-e2a673d46829.png) `golang-set` based...

It would be really valuable if this set type implemented the [BurntSushi `TextUnmarshaler` interface](https://github.com/BurntSushi/toml#using-the-encodingtextunmarshaler-interface), so it can be used with that library without needing to wrap the set (or fork...

community-patch-ok