jeudi 12 avril 2018

How to create struct dynamically in Golang by reading settings file?

I would like to create structs by reading *.yaml file and struct name, property names and their types should be set in settings file.

PERIOD: 1y
KEYSPACE: Lana
Tables:
  User:
    - UserId UUID
    - Gender String
    - Age Integer
    - Likes String
    - Income Integer
    - Children Integer

I know I should use reflection, should I? :-).





Aucun commentaire:

Enregistrer un commentaire