1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 17:20:55 +00:00

update len

This commit is contained in:
BaoyangChai 2019-02-12 18:53:34 +08:00
parent ba17bdd366
commit 2fefd8cbbf

View File

@ -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