Documentation ¶
Index ¶
- type Ints
- func (is Ints) Add(value int)
- func (is Ints) Contains(value int) bool
- func (is Ints) Difference(other Ints) Ints
- func (is Ints) Intersection(other Ints) Ints
- func (is Ints) IsEmpty() bool
- func (is Ints) Remove(value int)
- func (is Ints) Size() int
- func (is Ints) SortedValues() []int
- func (is Ints) Union(other Ints) Ints
- func (is Ints) Values() []int
- 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
- type Tags
- func (t Tags) Add(value names.Tag)
- func (t Tags) Contains(value names.Tag) bool
- func (t Tags) Difference(other Tags) Tags
- func (t Tags) Intersection(other Tags) Tags
- func (t Tags) IsEmpty() bool
- func (t Tags) Remove(value names.Tag)
- func (t Tags) Size() int
- func (t Tags) SortedValues() []names.Tag
- func (t Tags) Union(other Tags) Tags
- func (t Tags) Values() []names.Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ints ¶
Ints represents the classic "set" data structure, and contains ints.
func NewInts ¶
NewInts creates and initializes an Ints and populates it with initial values as specified in the parameters.
func (Ints) Difference ¶
Difference returns a new Ints representing all the values in the target that are not in the parameter.
func (Ints) Intersection ¶
Intersection returns a new Ints representing a intersection of the elments in the method target and the parameter.
func (Ints) Remove ¶
Remove takes a value out of the set. If value wasn't in the set to start with, this method silently succeeds.
func (Ints) SortedValues ¶
SortedValues returns an ordered slice containing all the values in the set.
type Strings ¶
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.
type Tags ¶
type Tags map[names.Tag]bool
Tags represents the Set data structure, it implements tagSet and contains names.Tags.
func NewTags ¶
func NewTags(initial ...names.Tag) Tags
NewTags creates and initializes a Tags and populates it with inital values as specified in the parameters.
func NewTagsFromStrings ¶
NewTagsFromStrings creates and initializes a Tags and populates it by using names.ParseTag on the initial values specified in the parameters.
func (Tags) Difference ¶
Difference returns a new Tags representing all the values in the target that are not in the parameter.
func (Tags) Intersection ¶
Intersection returns a new Tags representing a intersection of the elments in the method target and the parameter.
func (Tags) Remove ¶
func (t Tags) Remove(value names.Tag)
Remove takes a value out of the set. If value wasn't in the set to start with, this method silently succeeds.
func (Tags) SortedValues ¶
func (t Tags) SortedValues() []names.Tag
SortedValues returns an ordered slice containing all the values in the set.