点击运行
package main import ( "fmt" ) func main() { func() { fmt.Println("匿名函数直接调用!") }() }
运行结果 :
正在执行...