Why does go double the length (not capacity) when setting the len of slice during init?

前端 未结 0 736
再見小時候
再見小時候 2020-12-15 14:59

Consider the following go playground

func main() {
    fmt.Println("Hello, playground")
    map_a := make(map[string]int64)
    map_b := make(map[st         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题