world!" result := strings.Map(func(r rune) rune { return rune(int(r) - 32) ...
此示例将 int 切片转换为 interface{} 切片: t := []int{1, 2, 3, 4} s := make([]interface{}, len(t)) for i, v := range t { s[i] = v } Tom L 提出了这个例子(在 评论 中): package main import "fmt" func main() { x := []string{"a", "b", "c", "d"} fmt...
world!" result := strings.Map(func(r rune) rune { return rune(int(r) - 32) ...
此示例将 int 切片转换为 interface{} 切片: t := []int{1, 2, 3, 4} s := make([]interface{}, len(t)) for i, v := range t { s[i] = v } Tom L 提出了这个例子(在 评论 中): package main import "fmt" func main() { x := []string{"a", "b", "c", "d"} fmt...