github.com/friesencr/pop/v6@v6.1.6/genny/model/validations.go (about) 1 package model 2 3 import "github.com/gobuffalo/attrs" 4 5 func validatable(ats attrs.Attrs) attrs.Attrs { 6 var xats attrs.Attrs 7 for _, a := range ats { 8 n := a.Name.Proper().String() 9 if n == "CreatedAt" || n == "UpdatedAt" { 10 continue 11 } 12 switch a.GoType() { 13 case "string", "time.Time", "int": 14 xats = append(xats, a) 15 } 16 } 17 return xats 18 }