diff --git a/lazy.go b/lazy.go index ff77f46..f18dcd5 100644 --- a/lazy.go +++ b/lazy.go @@ -173,7 +173,7 @@ func RandomStruct(c StructConfig) (*StructMock, error) { //convert reflect.Value to []any retStructs := make([]any, 0) for x := 0; x < filled.Len(); x++ { - retStructs = append(retStructs, filled.Index(x)) + retStructs = append(retStructs, filled.Index(x).Elem()) } return &StructMock{