Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreEqual ¶
func AreEqual[T comparable](left, right Set[T]) bool
func AsSortedSlice ¶
func AsSortedSlice[T constraints.Ordered](set Set[T]) []T
AsSortedSlice returns a sorted slice of values from this set
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
Set provides a standard way to have a set of distinct things
func (Set[T]) Add ¶
func (set Set[T]) Add(x T)
Add adds the provided value into the set Nothing happens if the value is already present
func (Set[T]) AddAll ¶
AddAll adds the provided set into the existing set. Nothing happens for values which are already present
Click to show internal directories.
Click to hide internal directories.