golang, function types, 函数类型
golang, function types, 函数类型 function types A function type denotes the set of all functions with the same parameter and result types. 示例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 package main import "fmt" // function types type Greeting func(name string) string func say(g Greeting, n string) { fmt.Println(g(n)) } func english(name string) string {