title: GoLang equivalent for inheritence using interface with data and member functions
body: <p>I am a golang newbie so pardon me if there is something obvious I am missing. I have the following structures:</p>
  
  <pre><code>type base interface {
      func1()
      func2()
      common_func()
  }
  
  type derived1 struct {
      base // anonymous meaning inheritence
      data DatumType
  }
  
  type derived2 struct {
      base // anonymous meaning inheritence
      data DatumType
  }
  </code></pre>
  
  <p>Now I want to do the following:</p>
  
  <ol>
  <li>Keep '<code>data DatumType</code>' with <code>base</code> in some way so that looking at the definition of <code>base</code> one can know what data is common to all structs.
  <ol start="2">
  <li>Implement <code>common_func()</code> in one place so that the derived structs don't need to do it.</li>
  </ol></li>
  </ol>
  
  <p>I tried implementing the function with the interface but it fails compilation. I tried to create a struct and inherit from that but am not finding good ways to do that. Is there some clean way out ?</p>