Documentation ¶
Overview ¶
Package chezmoiset implements a generic set type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
A Set is a set of elements.
func NewWithCapacity ¶
func NewWithCapacity[T comparable](capacity int) Set[T]
NewWithCapacity returns a new empty set with the given capacity.
func (Set[T]) AnyElement ¶
func (s Set[T]) AnyElement() T
AnyElement returns an arbitrary element from s. It is typically used when s is known to contain exactly one element.
Click to show internal directories.
Click to hide internal directories.