What is the useful usage of slice capacity in Golang?

前端 未结 0 750
小鲜肉
小鲜肉 2021-01-23 06:16

Slice has capacity argument in slice short deflagration with make function.

    z := make([]float64, 5, 10)
    fmt.Println(len(z), cap(z))
    for i := 0; i <         


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