reflection - Convert reflect.value to reflect.method -
i have fallowing:
func newmethoddescriptor(typ interface{}) *methoddescriptor { reflectedmethod := reflect.valueof(typ) methodtype := reflectedmethod.type paramcount := methodtype.numin() - 1 ...
but when try:
newmethoddescriptor(func(){})
i compile time error:
methodtype.numin undefined (type func() reflect.type has no field or method numin)
Comments
Post a Comment