So how to return user.Class.Name
string in reflectCallArgs, is it impossible?
type User struct {
Class struct {
Name string
}
}
var user = &User{}
reflectCallArgs := func(src interface{}) string {
//how to get this string?
return "user.Class.Name"
}
reflectCallArgs(user.Class.Name)
Aucun commentaire:
Enregistrer un commentaire