In Go, how do you check if an object responds to a method?
For example, in Objective-C this can be achieved by doing:
if ([obj respondsToSelector:@se
If obj is an interface{} you can use Go type assertions:
interface{}
if correctobj, ok := obj.(interface{methodName()}); ok { correctobj.methodName() }