tkrajina / go-reflector

Go reflection simplified

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use with reflection ?

joeblew99 opened this issue · comments

I am finding that i need to do lots of code generation, and i wanted to ask your advice.
If i want to code gen from existing golang code, then i can reflect on it, and then use your template files to generate the output code. Make sense right?

I find that 90% of the time reflecting of golang code itslef is what i want to do.
But there are other times where i want to reflect off actual data. I might model a meta layer using structs, and then make lots of json data that conforms to the struct.

BTW, yes it makes sense. That's how I did it in a couple of projects and it worked without issues.