title: Invoking struct function gives "cannot refer to unexported field or method"
body: <p>I have a structure something like this:</p>
  
  <pre><code>type MyStruct struct {
      Id    string
  }
  </code></pre>
  
  <p>and function:</p>
  
  <pre><code>func (m *MyStruct) id() {
     // doing something with id here
  }
  </code></pre>
  
  <p>Also I have another structure like this:</p>
  
  <pre><code>type MyStruct2 struct {
      m *MyStruct
  }
  </code></pre>
  
  <p>Now I have a function:</p>
  
  <pre><code>func foo(str *MyStruct2) {
      str.m.id()
  }
  </code></pre>
  
  <p>But I'm getting error in compile time:</p>
  
  <pre><code>str.m.id undefined (cannot refer to unexported field or method mypackage.(*MyStruct)."".id
  </code></pre>
  
  <p>How can I call this function correctly?</p>