I am trying to create new instance of a struct, using it's type (reflect.TypeOf) at runtime. I have followed this thread on StackOverflow How do you create a new instance of a struct from it's Type at runtime in Go?. Here is my implementation http://ift.tt/1NjtanI. For some reason, I always get empty struct. I am unable to set fields or modify. Can someone suggest what is wrong?
Aucun commentaire:
Enregistrer un commentaire