title: Why does the SetAge() method not set the age correctly?
body: <p>I'm experimenting with GoLang and interfaces and struct inheritence.</p>
  
  <p>I've created a set of structures with the idea that I can keep common methods and values in a core structure an then just inherit this and add extra values as appropriate:</p>
  
  <pre><code>type NamedThing interface {
      GetName() string
      GetAge()  int
      SetAge(age int)
  }
  
  type BaseThing struct {
     name string
     age  int
  }
  
  func (t BaseThing) GetName() string {
     return t.name
  }
  
  func (t BaseThing) GetAge() int {
     return t.age
  }
  
  func (t BaseThing) SetAge(age int) {
     t.age = age
  }
  
  type Person struct {
     BaseThing
  }
  
  func main() {
      p := Person{}
      p.BaseThing.name = "fred"
      p.BaseThing.age = 21
      fmt.Println(p)
      p.SetAge(35)
      fmt.Println(p)
  }
  </code></pre>
  
  <p>Which you can also find here in the go playground:</p>
  
  <p><a href="https://play.golang.org/p/OxzuaQkafj" rel="nofollow noreferrer">https://play.golang.org/p/OxzuaQkafj</a></p>
  
  <p>However when I run the main method, the age remains as "21" and isn't updated by the SetAge() method.</p>
  
  <p>I'm trying to understand why this is and what I'd need to do to make SetAge work correctly.</p>