Documentation
¶
Index ¶
- func FromString(keyValuePairs string) map[string]string
- func GetKeysFromMap[T comparable, V any](m map[T]V) []T
- func GetValueFromMap[T comparable, V any](m map[T]V, key T, defaultValue V) V
- func MergeMaps[T comparable, V any](sources ...map[T]V) map[T]V
- func ToString(keyValues map[string]string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromString ¶
FromString Converts a string with comma separated key-value pairs to a map[string]string
func GetKeysFromMap ¶
func GetKeysFromMap[T comparable, V any](m map[T]V) []T
GetKeysFromMap returns the keys of a map
func GetValueFromMap ¶
func GetValueFromMap[T comparable, V any](m map[T]V, key T, defaultValue V) V
GetValueFromMap Returns the value of a key from a map If the key does not exist, the default value is returned
func MergeMaps ¶
func MergeMaps[T comparable, V any](sources ...map[T]V) map[T]V
MergeMaps combines two maps into one map. Maps are merged from the beginning of the sources slice, in case of key conflicts, values from source map with higher index will overwrite the previous ones.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.