Port scylladb/go-set to Go Generics.
The usage is almost identical to the original set package.
But for customized type , the original set package needs to generate new type package via gen_set.sh
; For generics set package , just uses it as the builtin type:
type CustomizedType struct {
f string
}
s:= New[CustomizedType]()
s.Add(CustomizedType{"a"})
if s.Has(CustomizedType{"a"}) {
// do something
}