deferについての動作確認

package main

import "fmt"

func main() {  
    defer fmt.Println("defer main func") 
    hoge()
    fmt.Println("Hello, playground")

}

func hoge(){  
    fmt.Println("hoge func")
    defer fmt.Println("defer hoge func1") 
    defer fmt.Println("defer hoge func2") 
}
hoge func  
defer hoge func2  
defer hoge func1  
Hello, playground  
defer main func