I'm trying to get the amount of entries in a map in Go. Is there a better way than:
count := 0
for key := range mymap {
count++
}
Thanks!
I'm trying to get the amount of entries in a map in Go. Is there a better way than:
count := 0
for key := range mymap {
count++
}
Thanks!
The len function works well for this: