I ran into a problem and I could use a little help, I want to be able to
distinguish between a *method that belongs to a struct* and a *func* using
the reflect package.
Here's the problem: http://play.golang.org/p/zpOwzq_xbg
First, I assign both functions to variables a and b.
Then, I would like to know which of the variables (a or b) is the one that
belongs to an struct (any struct) using only the reflect package. I don't
want to compare types against the trivialStruct I just need a way to
distinguish which one of them is part of a struct and which one is not.
Can you help me a bit? I know that there's a reflect.Struct type but I
don't know how can it be applied here.