gen
gen copied to clipboard
Fixed generation of DAOs for generic structs
- [x] Do only one thing
- [x] Non breaking API changes
- [x] Tested
What did this pull request do?
Allow gen to generate DAO for generic structs. This throws up an error previously
User Case Description
type User[T any] struct {
ID string
CreatedAt time.Time
UpdatedAt time.Time
Params T `gorm:"type:json;serializer:json"`
}
g := gen.NewGenerator(cfg)
g.ApplyBasic(User[any]{})
g.Execute()
Hi @bumberboy
Can you add some tests?