vendredi 26 juin 2015

Getting reflect.Type of structure

Is it possible in Golang to retrieve reflect.Type from structure itself?

pseudo:

type MyStruct struct {
  Name string
}

type := reflect.TypeOf(MyStruct)

And is it possible to make slice of that type afterwards?





Aucun commentaire:

Enregistrer un commentaire