Documentation ¶
Index ¶
- type Strings
- func (s *Strings) Add(value string)
- func (s *Strings) Contains(value string) bool
- func (s *Strings) Difference(other Strings) Strings
- func (s *Strings) Intersection(other Strings) Strings
- func (s *Strings) IsEmpty() bool
- func (s *Strings) Remove(value string)
- func (s *Strings) Size() int
- func (s *Strings) SortedValues() []string
- func (s *Strings) Union(other Strings) Strings
- func (s *Strings) Values() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strings ¶
type Strings struct {
// contains filtered or unexported fields
}
Strings represents the classic "set" data structure, and contains strings.
func NewStrings ¶
NewStrings creates and initializes a Strings and populates it with initial values as specified in the parameters.
func (*Strings) Difference ¶
Difference returns a new Strings representing all the values in the target that are not in the parameter.
func (*Strings) Intersection ¶
Intersection returns a new Strings representing a intersection of the elments in the method target and the parameter.
func (*Strings) Remove ¶
Remove takes a value out of the set. If value wasn't in the set to start with, this method silently succeeds.
func (*Strings) SortedValues ¶
SortedValues returns an ordered slice containing all the values in the set.
Click to show internal directories.
Click to hide internal directories.