go-sets
is a library for working with sets in Go, taking advantage of generics introduced in Go 1.18.
Add the library as a dependency:
go get github.com/siliconbrain/go-sets
Import it into your code:
import "github.com/siliconbrain/go-sets/sets"
Use to your heart's delight!