diff --git a/callbacks/helper.go b/callbacks/helper.go index ad85a1c6..d83d20ce 100644 --- a/callbacks/helper.go +++ b/callbacks/helper.go @@ -44,7 +44,7 @@ func ConvertSliceOfMapToValuesForCreate(stmt *gorm.Statement, mapValues []map[st columns = make([]string, 0, len(mapValues)) ) - // when the length of mapValues,return directly here + // when the length of mapValues is zero,return directly here // no need to call stmt.SelectAndOmitColumns method if len(mapValues) == 0 { stmt.AddError(gorm.ErrEmptySlice)