title: Non-interface methods in interface implementation
body: <p>I have an interface which defines a method. I have a struct which <em>implements</em> this interface. In it, I have implemented the methods from this interface and also have additional methods defined. </p>
  
  <p>For example:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )   
  
  type Animal interface {
      MakeNoise()
  }
  
  type Dog struct {
      color string
  }
  
  /* Interface implementation */
  
  func (d *Dog) MakeNoise() {
      fmt.Println("Bark!")
  }
  
  /* End Interface implementation */
  
  func (d *Dog) WagTail() {
      fmt.Println(d.color + " dog: Wag wag")
  }
  
  func NewDog(color string) Animal {
      return &amp;Dog{color}
  }
  
  func main() {
      dog := NewDog("Brown")
      dog.MakeNoise()
      dog.WagTail()
  
  }
  </code></pre>
  
  <p>On Playground: <a href="https://play.golang.org/p/B1GgoNToNl_l" rel="nofollow noreferrer">https://play.golang.org/p/B1GgoNToNl_l</a></p>
  
  <p>Here, WagTail() is not part of the Animal interface but belongs to the Dog struct. Running this code gives an error </p>
  
  <blockquote>
    <p>dog.WagTail undefined (type Animal has no field or method WagTail).</p>
  </blockquote>
  
  <p>Is there a way I could have a struct adhere to an interface and also define it's own methods? </p>