title: How to check if an object has a particular method?
body: <p>In Go, how do you check if an object responds to a method?</p>
  
  <p>For example, in Objective-C this can be achieved by doing:</p>
  
  <pre><code>if ([obj respondsToSelector:@selector(methodName:)]) { // if method exists
    [obj methodName:42]; // call the method
  }
  </code></pre>