Documentation
¶
Overview ¶
Package set implements a set & related functions.
Deprecated: moved to codeberg.org/clambin/go-common
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
Set holds a set of unique values
func Difference ¶ added in v0.2.0
Difference returns a new set containing the values from setA that don't exist in setB
func Intersection ¶ added in v0.2.0
Intersection returns a new set containing the common values between setA and setB
func (Set[T]) List ¶ added in v0.2.0
func (s Set[T]) List() []T
List returns all values present in the set. Order is not guaranteed. If ListOrdered() if required.
func (Set[T]) ListOrdered ¶ added in v0.3.0
func (s Set[T]) ListOrdered() []T
ListOrdered returns all values present in the set, in order
Click to show internal directories.
Click to hide internal directories.