Files
the-way-to-go_ZH_CN/eBook/examples/chapter_8/map_func.go
2013-11-24 18:50:57 +08:00

12 lines
210 B
Go

package main
import "fmt"
func main() {
mf := map[int]func() int{
1: func() int { return 10 },
2: func() int { return 20 },
5: func() int { return 50 },
}
fmt.Println(mf)
}