package main
import "fmt"
func main() {
//写入defer关键字
defer fmt.Println("main end1")
defer fmt.Println("main end2")
fmt.Println("main::hello go 1")
fmt.Println("main::hello go 2")
}
标签:defer,先后顺序,return,fmt,go,Println,main
From: https://www.cnblogs.com/suehoo/p/16632855.html