优化结构
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user