dont elem slice

This commit is contained in:
2025-09-30 11:41:28 -04:00
parent 9033530a55
commit 5e2ddecdcc

View File

@@ -129,7 +129,8 @@ func RandomStruct(c Config) (*StructMock, error) {
maxFieldCount := retType.NumField() maxFieldCount := retType.NumField()
//create slice of structs //create slice of structs
ft := reflect.SliceOf(retType) ft := reflect.SliceOf(retType)
filled := reflect.MakeSlice(ft, 0, c.RowCount).Elem() filled := reflect.MakeSlice(ft, 0, c.RowCount)
// filled := reflect.MakeSlice(ft, 0, c.RowCount).Elem()
args := make([]driver.Value, 0, maxFieldCount) args := make([]driver.Value, 0, maxFieldCount)
for x := 0; x < c.RowCount; x++ { for x := 0; x < c.RowCount; x++ {