2. 匿名函数

匿名函数没有函数名,只有函数体。

func(data int) {
    fmt.Println("hello", data)
}(100)