mardi 30 janvier 2018

Call Method Expression with Pointer to Struct as Receiver

There is func someFunc(v interface{}, fn interface{}) where v is a pointer to struct (say *A) and fn is a method expression (say (*A).method()). How to call fn with v as parameter (using reflect)?





Aucun commentaire:

Enregistrer un commentaire