diff --git a/orm/db.go b/orm/db.go index e488a5ab..8e7e93bb 100644 --- a/orm/db.go +++ b/orm/db.go @@ -631,10 +631,10 @@ func (d *dbBase) Update(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time. } if find { - newSetNames := make([]string, 0, 0) + newSetNames := make([]string, 0, len(setNames)-1) newSetNames = append(setNames[0:index], setNames[index+1:]...) setNames = newSetNames - newSetValues := make([]interface{}, 0, 0) + newSetValues := make([]interface{}, 0, len(setNames)-1) newSetValues = append(setValues[0:index], setValues[index+1:]...) setValues = newSetValues