title: golang way to do inheritance, the workaround
body: <p>I understand golang does not support inheritance, but what is the right way to do in go for the following? </p>
  
  <pre><code>type CommonStruct struct{
    ID string
  }
  
  type StructA struct{
    CommonStruct
    FieldA string
  }
  
  type StructB struct{
    CommonStruct
    FieldB string
  }
  
  func (s *CommonStruct) enrich(){
    s.ID = IDGenerator()
  }
  </code></pre>
  
  <p>how I can reuse the code in enrich for all other "sub struct" if the following function?</p>
  
  <pre><code>func doSomthing(s *CommoStruct){
    s.enrich()
  }
  </code></pre>