175
// NameTypeMap is added to the first map, ie., in case of conflicts, elements from the second map
176
// overwrites elements from the first map.
177
>
func MergeNameTypeMaps(a NameTypeMap, b NameTypeMap) NameTypeMap {
name_type_map.go
178
>
res := NameTypeMap{
179
>
systemSearchAttributes: make(map[string]enumspb.IndexedValueType),
180
>
predefinedSearchAttributes: make(map[string]enumspb.IndexedValueType),
181
>
customSearchAttributes: make(map[string]enumspb.IndexedValueType),
182
>
}
183
>
maps.Copy(res.systemSearchAttributes, a.systemSearchAttributes)
184
>
maps.Copy(res.systemSearchAttributes, b.systemSearchAttributes)
185
>
maps.Copy(res.predefinedSearchAttributes, a.predefinedSearchAttributes)
186
>
maps.Copy(res.predefinedSearchAttributes, b.predefinedSearchAttributes)
187
>
maps.Copy(res.customSearchAttributes, a.customSearchAttributes)
188
>
maps.Copy(res.customSearchAttributes, b.customSearchAttributes)
189
>
return res
190
>
}