切片下标 2020-03-18 本文已影响0人 anthonydan var x = []int{2:5,6,0:7} func main() { fmt.Println(x) } 结果: [7 0 5 6]