Fix randomize struct not ignoring boil - tag
This commit is contained in:
parent
e3ff48e647
commit
3ae0b8a0d6
1 changed files with 5 additions and 0 deletions
|
@ -98,6 +98,11 @@ func (s *Seed) RandomizeStruct(str interface{}, colTypes map[string]string, canB
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tagVal, _ := getBoilTag(fieldTyp)
|
||||||
|
if tagVal == "-" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
fieldDBType := colTypes[fieldTyp.Name]
|
fieldDBType := colTypes[fieldTyp.Name]
|
||||||
if err := s.randomizeField(fieldVal, fieldDBType, canBeNull); err != nil {
|
if err := s.randomizeField(fieldVal, fieldDBType, canBeNull); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue