如果我有一个地图m是有更好的方法得到一个值的v片
package main import ( "fmt" ) func main() { m := make(map[int]string) m[1] = "a" m[2] = "b" m[3] = "c" m[4] = "d" // Can this be done better? v := make([]string,len(m),len(m)) idx := 0 for _,value := range m { v[idx] = value idx++ } fmt.Println(v) }