new/null-types #2

Merged
jake merged 10 commits from new/null-types into main 2026-01-23 19:59:06 +00:00
Showing only changes of commit 88e67d69fc - Show all commits

View File

@@ -114,7 +114,6 @@ func kindToRandom(field reflect.StructField) any {
//manner. For now we check those types first, and will clean this up later.
switch field.Type {
case reflect.TypeOf(sql.NullTime{}):
fmt.Println("found nulltime")
var temp sql.NullTime
if !isNull() {
temp.Valid = true
@@ -191,10 +190,8 @@ func kindToRandom(field reflect.StructField) any {
case reflect.String:
return fmt.Sprintf("random %d", rand.Int())
case reflect.Bool:
fmt.Println("THIS TWO")
return rand.Int()%2 == 0
case reflect.TypeOf(time.Time{}).Kind():
fmt.Println("THIS?")
return time.Now()
case reflect.Array:
underlying := field.Type.Elem().Kind()
@@ -280,7 +277,7 @@ func kindToRandom(field reflect.StructField) any {
case reflect.String:
var strslice []string
for x := 0; x < count; x++ {
strslice = append(strslice, fmt.Sprintf("%d", rand.Int()))
strslice = append(strslice, fmt.Sprintf("random %d", rand.Int()))
}
return strslice
case reflect.Bool: