mergeMetadata merges new metadata with existing metadata. If the current metadata is nil, it initializes a new map. Parameters: - current: The existing metadata map. - new: The new metadata map to merge. Returns: - map[string]interface{}: The merged metadata map.
(current, new map[string]interface{})
| 183 | // Returns: |
| 184 | // - map[string]interface{}: The merged metadata map. |
| 185 | func mergeMetadata(current, new map[string]interface{}) map[string]interface{} { |
| 186 | if current == nil { |
| 187 | current = make(map[string]interface{}) |
| 188 | } |
| 189 | |
| 190 | for k, v := range new { |
| 191 | current[k] = v |
| 192 | } |
| 193 | |
| 194 | return current |
| 195 | } |
| 196 | |
| 197 | // updateEntityMetadata updates the metadata for a specific entity. |
| 198 | // It routes the update operation to the appropriate datasource method based on the entity type. |
no outgoing calls