Bump github.com/gookit/config/v2 from 2.2.2 to 2.2.3
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.2 to 2.2.3. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.2...v2.2.3) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
69bd2c24a7
commit
0aafeccb93
+8
-2
@@ -22,12 +22,19 @@ func SimpleMerge(src, dst map[string]any) map[string]any {
|
||||
if len(src) == 0 {
|
||||
return dst
|
||||
}
|
||||
|
||||
if len(dst) == 0 {
|
||||
return src
|
||||
}
|
||||
|
||||
for key, val := range src {
|
||||
if mp, ok := val.(map[string]any); ok {
|
||||
if dmp, ok := dst[key].(map[string]any); ok {
|
||||
dst[key] = SimpleMerge(mp, dmp)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// simple merge
|
||||
dst[key] = val
|
||||
}
|
||||
return dst
|
||||
@@ -54,7 +61,6 @@ func MergeStringMap(src, dst map[string]string, ignoreCase bool) map[string]stri
|
||||
if ignoreCase {
|
||||
k = strings.ToLower(k)
|
||||
}
|
||||
|
||||
dst[k] = v
|
||||
}
|
||||
return dst
|
||||
|
||||
Reference in New Issue
Block a user