Documentation ¶
Index ¶
- func ChunkStrings(targets []string, chunkSize int) [][]string
- func DiffStringMap(desired map[string]string, current map[string]string) (map[string]string, map[string]string)
- func MapFindFirst(key string, maps ...map[string]string) (string, bool)
- func MergeStringMap(maps ...map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChunkStrings ¶
ChunkStrings will split slice of String into chunks
func DiffStringMap ¶
func DiffStringMap(desired map[string]string, current map[string]string) (map[string]string, map[string]string)
DiffStringMap will diff desired with current. Returns the k/v that need to be add/updated and k/v that need to be deleted to make current match desired.
func MapFindFirst ¶
MapFindFirst get from list of maps until first found.
func MergeStringMap ¶
MergeStringMap will merge multiple map[string]string into single one. The merge is executed for maps argument in sequential order, if a key already exists, the value from previous map is kept. e.g. MergeStringMap(map[string]string{"a": "1", "b": "2"}, map[string]string{"a": "3", "d": "4"}) == map[string]string{"a": "1", "b": "2", "d": "4"}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.