func example() { defer fmt.Println("1st defer") defer fmt.Println("2nd defer") defer fmt.Println("3rd defer") fmt.Println("function body") } // 結果 function body 3rd defer 2nd defer 1st defer
var 優技録 = []string{ "Golang", "Vue.js", "AWS", "PHP", "DB", "IaC", "SRE"}
func example() { defer fmt.Println("1st defer") defer fmt.Println("2nd defer") defer fmt.Println("3rd defer") fmt.Println("function body") } // 結果 function body 3rd defer 2nd defer 1st defer