Call method in other package by name?

Viewed 302

I'm trying to call a method in another package by the name of the method (using the reflect package) but I'm not sure exactly how to do it.

What I'm trying so far is,

reflect.ValueOf(controller).MethodByName(action_name).Call()

(where controller is the other package)

Any ideas?

1 Answers
Related