For example,
type FooService interface {
Foo1(x int) int
Foo2(x string) string
}
What I am attempting to do is getting list ["Foo1", "Foo2"]
using runtime reflection.
For example,
type FooService interface {
Foo1(x int) int
Foo2(x string) string
}
What I am attempting to do is getting list ["Foo1", "Foo2"]
using runtime reflection.
Try this:
playground example
Getting the reflect.Type for the interface type is the tricky part. See How to get the reflect.Type of an interface? for an explanation.