Search Apps Documentation Source Content File Folder Download Copy Actions Download

utils.gno

0.34 Kb · 17 lines
 1package chunk
 2
 3func parseKeyValue(arr []string) map[string]string {
 4	m := make(map[string]string)
 5	for i := 0; i < len(arr)-1; i += 2 {
 6		m[arr[i]] = arr[i+1]
 7	}
 8	return m
 9}
10
11func copyStringMap(source map[string]string) map[string]string {
12	result := make(map[string]string)
13	for key, value := range source {
14		result[key] = value
15	}
16	return result
17}