I write the follow code
package main
import "fmt"
func main() {
defer func() func() {
fmt.Println("start")
return func() {
fmt.Println("end")
}
}()()
fmt.Println("aaaa")
return
}
and I except output is aaaa start end
but actual output is start aaaa end
I can't understand why output "start" before "aaaa"