Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidType = errors.New("invalid type")
ErrInvalidType is returned by initialization functions expecting specific types.
Functions ¶
This section is empty.
Types ¶
type StringSet ¶
type StringSet map[string]struct{}
StringSet is an unordered set of unique strings.
func FromMapKeys ¶
FromMapKeys returns a new StringSet initialized with m's keys. It returns InvalidType if m is not a map or its keys are not type string.
func FromMapVals ¶
FromMapVals returns a new StringSet initialized with m's values. It returns InvalidType if m is not a map or its values are not type string.
func FromSlice ¶
FromSlice returns a new StringSet initialized with s's values. It returns InvalidType if sl is not a slice of type string.
func (StringSet) Equals ¶
Equals returns true if all the values of s are in t and vice-versa. Order is not considered.
Click to show internal directories.
Click to hide internal directories.