Assume I have data model written in some sort of yaml file.
schema: human
type: object
properties:
name:
type: string
surname:
type: string
I would like to parse it, and generate structure:
type Human struct {
Name string `db:"name"`
Surname string `db:"surname"`
}
Is it possible to generate runtime Go struct using reflection?