Fix randomize struct not ignoring boil - tag

This commit is contained in:
Patrick O'brien 2016-08-18 14:21:08 +10:00
parent e3ff48e647
commit 3ae0b8a0d6

View file

@ -98,6 +98,11 @@ func (s *Seed) RandomizeStruct(str interface{}, colTypes map[string]string, canB
continue
}
tagVal, _ := getBoilTag(fieldTyp)
if tagVal == "-" {
continue
}
fieldDBType := colTypes[fieldTyp.Name]
if err := s.randomizeField(fieldVal, fieldDBType, canBeNull); err != nil {
return err