del merge

This commit is contained in:
jiangyong 2025-07-30 17:21:57 +08:00
parent d2731144ae
commit b854d2862f
1 changed files with 0 additions and 20 deletions

View File

@ -48,23 +48,3 @@ func NewFroms(tplConfig, saveConfig string) ([]*Form, error) {
}
return forms, err
}
func MergeConfig(oldConfig, newConfig string) (string, error) {
var oldCfg map[string]interface{}
var newCfg map[string]interface{}
json.Unmarshal([]byte(oldConfig), &oldCfg)
json.Unmarshal([]byte(newConfig), &newCfg)
if oldCfg == nil {
oldCfg = make(map[string]interface{})
}
if newCfg == nil {
newCfg = make(map[string]interface{})
}
for k, v := range newCfg {
oldCfg[k] = v
}
res, _ := json.Marshal(oldCfg)
return string(res), nil
}