mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
chore: fix lint
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
e0bf4ac05d
commit
55fac1047e
1 changed files with 4 additions and 2 deletions
6
viper.go
6
viper.go
|
@ -1718,7 +1718,8 @@ func keyExists(k string, m map[string]interface{}) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func castToMapStringInterface(
|
func castToMapStringInterface(
|
||||||
src map[interface{}]interface{}) map[string]interface{} {
|
src map[interface{}]interface{},
|
||||||
|
) map[string]interface{} {
|
||||||
tgt := map[string]interface{}{}
|
tgt := map[string]interface{}{}
|
||||||
for k, v := range src {
|
for k, v := range src {
|
||||||
tgt[fmt.Sprintf("%v", k)] = v
|
tgt[fmt.Sprintf("%v", k)] = v
|
||||||
|
@ -1756,7 +1757,8 @@ func castMapFlagToMapInterface(src map[string]FlagValue) map[string]interface{}
|
||||||
// deep. Both map types are supported as there is a go-yaml fork that uses
|
// deep. Both map types are supported as there is a go-yaml fork that uses
|
||||||
// `map[string]interface{}` instead.
|
// `map[string]interface{}` instead.
|
||||||
func mergeMaps(
|
func mergeMaps(
|
||||||
src, tgt map[string]interface{}, itgt map[interface{}]interface{}) {
|
src, tgt map[string]interface{}, itgt map[interface{}]interface{},
|
||||||
|
) {
|
||||||
for sk, sv := range src {
|
for sk, sv := range src {
|
||||||
tk := keyExists(sk, tgt)
|
tk := keyExists(sk, tgt)
|
||||||
if tk == "" {
|
if tk == "" {
|
||||||
|
|
Loading…
Reference in a new issue