Go语言获取map的长度

发布于 2016-11-03 19:47:29
package main

import (
    "fmt"
)

func main() {

     testMap := map[string] string {"France":"Paris","Italy":"Rome","Japan":"Tokyo","India":"New Delhi"}

     //输出testMap长度
     fmt.Println(len(testMap ))

}
0 条评论

发布
问题