On Tue, Feb 11, 2014 at 5:02 AM, Giulio De Donato <
liu...@gmail.com> wrote:
>
> I'm trying to save a function in a variable,
> then execute it and get the result.
>
> So far so good, I can do it thanks to reflect.Call
> but I can not use the result of that function.
>
> How could I use the result of that func as argument for another param?
> How could I use the result of that func if is a contructor for struct type?
I'm sorry I don't entirely understand the question. reflect.Call
returns the results of the function call. So you have a list of
reflect.Value's that you can do whatever you want with.
Perhaps rather than pointing to other code that is similar to what you
want, you could write a short snippet of code that tries to do what
you want and point out where it doesn't work.
In particular I don't know what you mean by "a constructor for struct
type."
Ian