title: Call a Struct and its Method by name in Go?
body: <p>I have found a function call <code>MethodByName()</code> here <a href="http://golang.org/pkg/reflect/#Value.MethodByName" rel="noreferrer">http://golang.org/pkg/reflect/#Value.MethodByName</a> but it's not exactly what I want! (maybe because I don't know how to use it ... I cannot find any example with it). What I want is:</p>
  
  <pre><code>type MyStruct struct {
  //some feilds here
  } 
  func (p *MyStruct) MyMethod { 
      println("My statement."); 
  } 
  
  CallFunc("MyStruct", "MyMethod"); 
  //print out "My statement." 
  </code></pre>
  
  <p>So I guess, first I need something like <code>StructByName()</code> and after that use it for <code>MethodByName()</code>, is that right!?</p>