mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 05:11:49 +08:00
12 lines
210 B
Go
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)
|
|
}
|