点击运行
package main import "fmt" func main() { if (true) { defer fmt.Printf("1") } else { defer fmt.Printf("2") } fmt.Printf("3") }
运行结果 :
正在执行...