This is a Set
based on Generic
and Map
implementations.
go get github.com/min0625/set
package main
import (
"fmt"
"github.com/min0625/set"
)
func main() {
s := make(set.Set[int])
s.Store(1, 2, 3)
fmt.Println(s.Has(1))
s.Delete(1)
fmt.Println(s.Has(1))
// Output:
// true
// false
}