From 053f5b5fd877585d14484dc60db618a1751d5de6 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 30 Sep 2025 16:25:54 -0400 Subject: [PATCH] no more index check --- lazy.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lazy.go b/lazy.go index eff2890..b72bc90 100644 --- a/lazy.go +++ b/lazy.go @@ -114,6 +114,9 @@ func RandomRows(m Config) (*RowMock, error) { }, nil } +// we are close to something here but the mock structs aren't it chief. Maybe the users can make() them first? +// I don't love that either tho tbh +// hmmmmm func RandomStruct(c Config) (*StructMock, error) { if c.Example == nil { return nil, ErrBadExample @@ -148,12 +151,12 @@ func RandomStruct(c Config) (*StructMock, error) { } args[y] = nv - if x == 0 { - nf := filled.Index(x).Field(y) - if nf.CanSet() { - filled.Index(x).Field(y).Set(reflect.ValueOf(nv)) - } + // if x == 0 { + nf := filled.Index(x).Field(y) + if nf.CanSet() { + filled.Index(x).Field(y).Set(reflect.ValueOf(nv)) } + // } } }