Fix broken u u i d
This commit is contained in:
parent
f823dfc757
commit
39eebe7a91
1 changed files with 3 additions and 3 deletions
|
@ -281,15 +281,15 @@ func randomizeField(field reflect.Value, fieldType string, includeInvalid bool)
|
|||
newVal = null.NewBool(false, false)
|
||||
}
|
||||
case typeNullString:
|
||||
if b {
|
||||
if fieldType == "uuid" {
|
||||
newVal = null.NewString(uuid.NewV4().String(), true)
|
||||
} else if b {
|
||||
switch fieldType {
|
||||
case "interval":
|
||||
newVal = null.NewString(strconv.Itoa((sd.nextInt()%26)+2)+" days", b)
|
||||
default:
|
||||
newVal = null.NewString(randStr(1, sd.nextInt()), b)
|
||||
}
|
||||
} else if fieldType == "uuid" {
|
||||
newVal = null.NewString(uuid.NewV4().String(), true)
|
||||
} else {
|
||||
newVal = null.NewString("", false)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue