Documentation ¶
Index ¶
- func Deduplicate(input []string) []string
- type Set
- func (s Set) Has(element string) bool
- func (s Set) Insert(element string)
- func (s Set) InsertMany(elements ...string)
- func (s Set) Intersect(other Set)
- func (s Set) Len() int
- func (s Set) Remove(element string)
- func (s *Set) Set(input string) error
- func (s Set) Slice() []string
- func (s *Set) String() string
- func (s Set) Subtract(other Set)
- func (s Set) Union(other Set)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deduplicate ¶
Deduplicate utilizes the Set type to generate a unique list of strings from the input slice.
Types ¶
type Set ¶
type Set map[string]nothing
Set implements set operations for string values.
func (Set) InsertMany ¶
InsertMany adds all the elements strings into the receiver Set.
func (Set) Intersect ¶
Intersect causes the receiver Set to only contain elements also found in the other Set argument.
Click to show internal directories.
Click to hide internal directories.