golang数组

Posted _qunshan_

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了golang数组相关的知识,希望对你有一定的参考价值。

go有两种创建数组的方式

  1. arr1 := [10]int{0,1,2,3,4,5,6,7,8,9}
  2. arr2 := [...]int{0,1,2,3,4,5,6,7,8,9}

runtime表示

type StringHeader struct {
    Data uintptr
    Len  int
}

以上是关于golang数组的主要内容,如果未能解决你的问题,请参考以下文章