diff --git a/lazy.go b/lazy.go index 6c38fe0..667e5d6 100644 --- a/lazy.go +++ b/lazy.go @@ -172,7 +172,7 @@ func RandomStruct(c StructConfig) (*StructMock, error) { //convert reflect.Value to []any retStructs := make([]any, 0) - for x := 0; x < filled.Len(); x++ { + for x := 0; x < c.RowCount; x++ { retStructs = append(retStructs, filled.Index(x).Interface()) }