deckarep/golang-set
View on GitHub ↗ ★ 4,777 Go
A simple, battle-tested and generic set type for the Go language. Trusted by GoogleCloudPlatform, Docker, 1Password, Ethereum and Hashicorp.
6 mentions on Hacker News by 6 people: 1 story, 5 comments · first 2013-07-23 · latest 2024-08-12
20082026
-
https://github.com/deckarep/golang-set offers a thread safety option and methods like contains all, intersect, and equal.
comment by erik_seaberg · 2024-08-12 · in Go is my hammer, and everything is a nail -
…more - starting from the built-in `append`, hah. Although even that is not universal - consider e.g. github.com/deckarep/golang-set, which I believe is one of most popular set packages, based on number of imports. It doesn't strike me as…
comment by drdaeman · 2022-07-09 · in Go generics are not bad -
…- instead of using a hash I would use a Set . I see that Golang has at least one implementation: https://github.com/deckarep/golang-set If for some reason going "high level" is not an option, this: > For trivial examples this works well,…
comment by otikik · 2019-04-12 · in Removing Array Duplicates -
Agreed. There is an awesome project that provides this: https://github.com/deckarep/golang-set
comment by nickpresta · 2013-07-23 · in Impressions of Go