s := []int{1,23}fmt.Println(s) //[1 2 3]copy456789})//[4 5 6]
- 有一种特殊用法,将字符串当成[]byte类型的slice
bytes byte("hello world"bytes"ha ha")
s := []int{1,23}fmt.Println(s) //[1 2 3]copy456789})//[4 5 6]
bytes byte("hello world"bytes"ha ha")