copyStatsMap makes a copy of the map.
(originalMap map[string]int32)
| 114 | |
| 115 | // copyStatsMap makes a copy of the map. |
| 116 | func copyStatsMap(originalMap map[string]int32) map[string]int32 { |
| 117 | newMap := make(map[string]int32, len(originalMap)) |
| 118 | for k, v := range originalMap { |
| 119 | newMap[k] = v |
| 120 | } |
| 121 | return newMap |
| 122 | } |
| 123 | |
| 124 | // copyStatsIntMap makes a copy of the map. |
| 125 | func copyStatsIntMap(originalMap map[int32]int32) map[int32]int32 { |