|
@@ -60,22 +60,24 @@ func ConfigRefreshData(cont context.Context) (err error) {
|
|
|
}
|
|
|
|
|
|
// Function to merge two maps
|
|
|
-func mergeMaps(dst map[string][]*edb_refresh.EdbInfoListAndRefreshConfig, src map[string][]*edb_refresh.EdbInfoListAndRefreshConfig) map[string][]*edb_refresh.EdbInfoListAndRefreshConfig {
|
|
|
+func mergeMaps(dst map[string][]*edb_refresh.EdbInfoListAndRefreshConfig, src map[string][]*edb_refresh.EdbInfoListAndRefreshConfig) (newMap map[string][]*edb_refresh.EdbInfoListAndRefreshConfig) {
|
|
|
if dst == nil {
|
|
|
return src
|
|
|
}
|
|
|
if src == nil {
|
|
|
return dst
|
|
|
}
|
|
|
+ newMap = dst
|
|
|
for k, v := range src {
|
|
|
- if dstk, ok := dst[k]; ok {
|
|
|
- dstk = append(dstk, v...)
|
|
|
- dst[k] = dstk
|
|
|
+ if newK, ok := newMap[k]; ok {
|
|
|
+ newK = append(newK, v...)
|
|
|
+ newMap[k] = newK
|
|
|
} else {
|
|
|
- dst[k] = v
|
|
|
+ newMap[k] = v
|
|
|
}
|
|
|
}
|
|
|
- return dst
|
|
|
+
|
|
|
+ return newMap
|
|
|
}
|
|
|
|
|
|
// getDefaultRefreshData
|