object. It looks like it should be easy, but I can't find a way. I've
looked at the "reflect" package but haven't been able to find what I need.
Can someone give me a clue?
package main
import (
"fmt"
)
type Person struct {}
func (p *Person) Run() {
fmt.Println("person running")
}
func doit(object interface{}, method interface{}) {
// how to invoke object.method() ?
}
func main() {
p := new(Person)
doit(p, (*Person).Run)
}
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.