Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[K comparable] struct { // contains filtered or unexported fields }
Set tracks unique values of type K backed by a map for O(1) lookups.
func NewSet ¶ added in v0.12.17
func NewSet[K comparable]() *Set[K]
NewSet creates an empty Set with an initialized backend map.
func (*Set[K]) Add ¶
Add inserts a value into the set and raises an error if it already exists.
Source Files
¶
- Set.go
Click to show internal directories.
Click to hide internal directories.