title: Understanding struct embedding
body: <p>Can someone explain me why this code  prints 1 and not 2?</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  type S1 struct{
      f1 string
  }
  
  type S2 struct{
      S1
      f2 string
  }   
  
  func (s *S1) Say(){
      fmt.Println("1")
  }   
  
  func (s *S2) Say(){
      fmt.Println("2")
  }       
  
  type S3 S2
  
  func main() {
      var s3 S3
      s3.Say()
  }
  </code></pre>
  
  <p>(Runnable at: <a href="https://play.golang.org/p/_cjNxBKgSf" rel="nofollow noreferrer">https://play.golang.org/p/_cjNxBKgSf</a>)</p>