Documentation ¶
Overview ¶
Package slice provides a set of functions around slices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAll ¶
ContainsAll return true if a string slice contains all elements of another string slice, otherwise returns false.
Types ¶
type StringSlice ¶
type StringSlice []string
StringSlice wraps a string slice to provide methods on top of it
func (StringSlice) ToMap ¶
func (ss StringSlice) ToMap(sep string) map[string]string
ToMap iterates over the slice and slices each element into substrings separated by sep. Then it adds a map key value pair where the key is the first substring and value is the second substring
If the sep is not found in the slice element then it's ignored ¶
It returns the produced map after iterating all slice elements
Click to show internal directories.
Click to hide internal directories.