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 7fd2f60168 - Show all commits

View File

@@ -104,9 +104,7 @@ func RandomGenerate(m Config) (*Mock, error) {
switch field.Type {
case reflect.TypeOf(sql.NullTime{}):
var temp sql.NullTime
if isNull() {
temp.Valid = false
} else {
if !isNull() {
temp.Valid = true
temp.Time = time.Now()
}