package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Dec 24, 2025
License: AGPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Set is a generic set implementation with thread safety
func (s *Set[T]) Add(value T)
Add adds a value to the set
Clear removes all elements from the set
func (s *Set[T]) Contains(value T) bool
Contains checks if a value is in the set
func (s *Set[T]) Remove(value T)
Remove removes a value from the set
Size returns the number of elements in the set
func (s *Set[T]) ToSlice() []T
ToSlice converts the set to a slice
Source Files
¶
Click to show internal directories.
Click to hide internal directories.