Documentation
¶
Index ¶
- func CompareStringSlices(a, b []string) bool
- func HasOneOfPrefixes(s string, prefixes ...string) bool
- func MatchesLabels(targetLabels, wantedLabels map[string]string) bool
- func StringInSlice(haystack []string, needle string) bool
- func StringsInSlice(haystack []string, needles ...string) bool
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareStringSlices ¶
CompareStringSlices does two string array comparison
func HasOneOfPrefixes ¶
HasOneOfPrefixes returns true if the provided string starts with any of the specified prefixes
func MatchesLabels ¶
MatchesLabels determines whether a set of "target" labels matches the set of "wanted" labels
func StringInSlice ¶
StringInSlice returns true if needle is within haystack
func StringsInSlice ¶
StringsInSlice returns true if needles are within haystack
Types ¶
type StringSet ¶
type StringSet map[string]struct{}
StringSet is a set of unique strings
func NewStringSetFromSlice ¶
NewStringSetFromSlice creates stringset from slice
Click to show internal directories.
Click to hide internal directories.