set map size to the shallowCopy

This commit is contained in:
Gani Georgiev 2022-12-12 15:58:56 +02:00
parent 21f442293f
commit 54c52f696c
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ func (m *Record) getNormalizeDataValueForDB(key string) any {
// shallowCopy shallow copy data into a new map.
func shallowCopy(data map[string]any) map[string]any {
result := map[string]any{}
result := make(map[string]any, len(data))
for k, v := range data {
result[k] = v