Documentation ¶
Index ¶
- func ComparePartitionPaths(a, b string) bool
- func ContainsString(slice []string, s string) bool
- func IsIPv4(address string) bool
- func IsIPv6(address string) bool
- func ListChanged(a, b []string) bool
- func ListDelta(a, b []string) (added []string, removed []string, same []string)
- func ListIntersect(a []string, b []string) ([]string, bool)
- func RemoveString(slice []string, s string) (result []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePartitionPaths ¶
ComparePartitionPaths is a utility function that compares the disk portion of two partition paths. It returns true if the disk portion of a and b match.
func ContainsString ¶
ContainsString is a utility function that determines whether a string is included in the list of elements of a slice.
func ListChanged ¶
ListChanged is a utility function which determines if a list of names provided in a spec is equivalent to the list of names return by the system API. Since the spec accepts nil as a list that wasn't specified we consider the nil case as an empty list when comparing against the system API.
func ListDelta ¶
ListDelta is a utility function which calculates the difference between two lists. If elements in 'b' are not present in 'a' then they will appear in the 'added' list. If elements in a are not present in b then they will appear in the 'removed' list.
func ListIntersect ¶
ListIntersect is a utility function which determines if there is any commonality between two lists of strings.
func RemoveString ¶
RemoveString is a utility function that removes a string from the list of elements of a slice.
Types ¶
This section is empty.