Documentation ¶
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{}
Set is a container that can hold each item only once and has a fast lookup time.
You can define a new set like this:
var validKeyLengths = collections.Set[int]{ 16: {}, 24: {}, 32: {}, }
You can also use the constructor to create a new set
var validKeyLengths = collections.NewSet[int](16,24,32)
func NewSet ¶
func NewSet[T comparable](members ...T) Set[T]
Constructs a new set given the members of type T
Click to show internal directories.
Click to hide internal directories.