mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
chore: fix Error log calls in mergeMaps
The logger interface uses k,v pairs, but it was being called with a format string, here. Changed to use k,v pairs. I didn't find any other instances of this problem.
This commit is contained in:
parent
f50ce904a9
commit
da55858fff
1 changed files with 14 additions and 4 deletions
18
viper.go
18
viper.go
|
@ -1809,8 +1809,13 @@ func mergeMaps(
|
||||||
tsv, ok := sv.(map[interface{}]interface{})
|
tsv, ok := sv.(map[interface{}]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
v.logger.Error(
|
v.logger.Error(
|
||||||
"Could not cast sv to map[interface{}]interface{}; key=%s, st=%v, tt=%v, sv=%v, tv=%v",
|
"Could not cast sv to map[interface{}]interface{}",
|
||||||
sk, svType, tvType, sv, tv)
|
"key", sk,
|
||||||
|
"st", svType,
|
||||||
|
"tt", tvType,
|
||||||
|
"sv", sv,
|
||||||
|
"tv", tv,
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1822,8 +1827,13 @@ func mergeMaps(
|
||||||
tsv, ok := sv.(map[string]interface{})
|
tsv, ok := sv.(map[string]interface{})
|
||||||
if !ok {
|
if !ok {
|
||||||
v.logger.Error(
|
v.logger.Error(
|
||||||
"Could not cast sv to map[string]interface{}; key=%s, st=%v, tt=%v, sv=%v, tv=%v",
|
"Could not cast sv to map[string]interface{}",
|
||||||
sk, svType, tvType, sv, tv)
|
"key", sk,
|
||||||
|
"st", svType,
|
||||||
|
"tt", tvType,
|
||||||
|
"sv", sv,
|
||||||
|
"tv", tv,
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
mergeMaps(tsv, ttv, nil)
|
mergeMaps(tsv, ttv, nil)
|
||||||
|
|
Loading…
Reference in a new issue