You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
i have two struct, when i load them, i wish the same key will be merge,but not. i read the source code,it seems already merge not return
To Reproduce
type A struct {
A string
B string
C string
D string
}
k := koanf.New(".")
a := &A{
A: "1",
B: "2",
C: "3",
D: "4",
}
b := &A{
A: "5",
D: "8",
}
if err := k.Load(structs.Provider(a, ""), nil); err != nil {
fmt.Printf("load baseRootCfg fail:", err)
panic(err)
}
if err := k.Load(structs.Provider(b, ""), nil); err != nil {
fmt.Printf("load config.Dubbo fail:", err)
panic(err)
}
Describe the bug
i have two struct, when i load them, i wish the same key will be merge,but not. i read the source code,it seems already merge not return
To Reproduce
i try use
Merge
, but is the same resultExpected behavior
Merge the two structures normally, if the same key, use the finally value
Please provide the following information):
The text was updated successfully, but these errors were encountered: