Golang奇葩点

本文即Go语言的那些坑二。git Golang中函数被看作是值,函数值不能够比较,也不能够做为map的key 请问如下代码能编译经过吗?github import ( "fmt" ) func main(){ array := make(map[int]func ()int) array[func()int{ return 10}()] = func()int{ return 12
相关文章
相关标签/搜索