Le 25 juin 2013 01:18, "David DENG" <david...@gmail.com> a écrit :
>
> I only need the type information (as a reflect.Type), but reflect.TypeOf receives a value. How can I get the reflect.Type without creating a value?
>
You need the type information of what?
Rémy.
type Arith intfunc (a *Arith) Add(a, b int) int {}
tp := reflect.TypeOf(arith);
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
tp := reflect.TypeOf((*Arith)(nil))
--
What if I want to get the Type of an interface? Any trick for that?