优化结构

This commit is contained in:
Yvan
2026-08-28 10:21:59 +08:00
parent a16d362bb5
commit fec3820464
19 changed files with 138 additions and 136 deletions
@@ -84,15 +84,9 @@ func (s *IntegrationConfigService) Delete(ctx context.Context, kind, provider st
}
func mergeConfigJSON(defaults map[string]any, raw json.RawMessage) json.RawMessage {
values := make(map[string]any, len(defaults))
for key, value := range defaults {
values[key] = value
}
stored := map[string]any{}
_ = json.Unmarshal(raw, &stored)
for key, value := range stored {
values[key] = value
}
values := integrationbiz.MergeIntegrationDefaults(defaults, stored)
encoded, _ := json.Marshal(values)
return encoded
}