new/null-types #2
2
lazy.go
2
lazy.go
@@ -111,7 +111,7 @@ func RandomGenerate(m Config) (*Mock, error) {
|
|||||||
// converts basic reflect Kind's to psuedo-random data, slices are given a random amount of entries
|
// converts basic reflect Kind's to psuedo-random data, slices are given a random amount of entries
|
||||||
func kindToRandom(field reflect.StructField) any {
|
func kindToRandom(field reflect.StructField) any {
|
||||||
//this isn't ideal, but since the sql types are structs they were being filled in a weird
|
//this isn't ideal, but since the sql types are structs they were being filled in a weird
|
||||||
//manner. For now we check those types first, clean this up later.
|
//manner. For now we check those types first, and will clean this up later.
|
||||||
switch field.Type {
|
switch field.Type {
|
||||||
case reflect.TypeOf(sql.NullTime{}):
|
case reflect.TypeOf(sql.NullTime{}):
|
||||||
fmt.Println("found nulltime")
|
fmt.Println("found nulltime")
|
||||||
|
|||||||
Reference in New Issue
Block a user