Documentation ¶
Overview ¶
Package hashset provides an implementation of a hashset.
Example ¶
package main import ( "fmt" g "github.com/zendesk/generic" "github.com/zendesk/generic/hashset" ) func main() { set := hashset.New[string](3, g.Equals[string], g.HashString) set.Put("foo") set.Put("bar") set.Put("baz") fmt.Println(set.Has("foo")) fmt.Println(set.Has("quux")) }
Output: true false
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[K any] struct { // contains filtered or unexported fields }
Set implements a hashset, using the hashmap as the underlying storage.
Click to show internal directories.
Click to hide internal directories.