mercredi 1 mars 2017

How to get field name in Golang

Hi I'm looking for a function like this:

var fieldName string = getFieldName((&myStruct{}).AField)
log.Println(fieldName)//==> "AField"





Aucun commentaire:

Enregistrer un commentaire