The setutil package provides utility functions for working with sets implemented as map[K]struct{}.
Overview
All functions in this package are pure: they never modify their input. They are generic and work with any comparable key type using Go's type-parameter syntax.
import "github.com/github/gh-aw/pkg/setutil"
// Check membership in a string set
seen := map[string]struct{}{"foo": {}, "bar": {}}
if setutil.Contains(seen, "foo") {
// ...
}